Method: Decode::Comment::Tag.parse

Defined in:
lib/decode/comment/tag.rb

.parse(directive, text, lines, tags, level = 0) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/decode/comment/tag.rb', line 26

def self.parse(directive, text, lines, tags, level = 0)
  if match = self::PATTERN.match(text)
    node = self.build(directive, match)
    
    tags.parse(lines, level + 1) do |child|
      node.add(child)
    end
    
    return node
  else
    # Consume all nested nodes:
    tags.ignore(lines, level + 1)
  end
end