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:
parent
287cf8c58a
commit
08dedcd78a
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue