class Haml::Parser

def parse_static_hash(text)

def parse_static_hash(text)
  attributes = {}
  scanner = StringScanner.new(text)
  scanner.scan(/\s+/)
  until scanner.eos?
    return unless key = scanner.scan(LITERAL_VALUE_REGEX)
    return unless scanner.scan(/\s*=>\s*/)
    return unless value = scanner.scan(LITERAL_VALUE_REGEX)
    return unless scanner.scan(/\s*(?:,|$)\s*/)
    attributes[eval(key).to_s] = eval(value).to_s
  end
  attributes
end