Class: Hamlit::Compiler::SilentScriptCompiler

Inherits:
Object
  • Object
show all
Defined in:
lib/hamlit/compiler/silent_script_compiler.rb

Instance Method Summary collapse

Instance Method Details

#compile(node, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/hamlit/compiler/silent_script_compiler.rb', line 5

def compile(node, &block)
  if node.children.empty?
    [:multi, [:code, node.value[:text]], [:newline]]
  else
    compile_with_children(node, &block)
  end
end