Class: Haml::MagicTranslations::XGetText::HamlParser::HamlEngineParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/haml/magic_translations/xgettext/haml_parser.rb

Instance Method Summary collapse

Instance Method Details

#tag(line) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/haml/magic_translations/xgettext/haml_parser.rb', line 53

def tag(line)
  tag_name, attributes, attributes_hashes, object_ref, nuke_outer_whitespace,
    nuke_inner_whitespace, action, value, last_line = parse_tag(line)
  if action && (action == '=' || (action == '!' && value[0] == ?=) ||
                                 (action == '&' && value[0] == ?=))
    parsed_tag = true
  else
    parsed_tag = false
  end
  node = super(line)
  node[:value][:parsed_tag] = parsed_tag
  node
end