class Haml::AttributeParser

def parse(text)

def parse(text)
  exp = wrap_bracket(text)
  return if Temple::StaticAnalyzer.syntax_error?(exp)
  hash = {}
  tokens = Ripper.lex(exp)[1..-2] || []
  each_attr(tokens) do |attr_tokens|
    key = parse_key!(attr_tokens)
    hash[key] = attr_tokens.map { |t| t[2] }.join.strip
  end
  hash
rescue ParseSkip
  nil
end