1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Opt-in AST node type

This commit is contained in:
Takashi Kokubun 2015-10-12 17:57:12 +09:00
parent 287cf8c58a
commit 08dedcd78a

View file

@ -34,8 +34,10 @@ module Hamlit
compile_tag(node)
when :plain
compile_plain(node)
else
when :haml_comment
[:multi]
else
raise InternalError.new("Unexpected node type: #{node.type}")
end
end
@ -62,5 +64,8 @@ module Hamlit
def compile_plain(node)
[:static, node.value[:text]]
end
class InternalError < RuntimeError
end
end
end