Class: NScript::ThrowNode
Constant Summary
Constants inherited from Node
Instance Method Summary collapse
- #compile_node(o) ⇒ Object
-
#initialize(expression) ⇒ ThrowNode
constructor
A new instance of ThrowNode.
Methods inherited from Node
#children, children, #compile, #compile_closure, #contains?, #idt, statement, #statement?, statement_only, #statement_only?, top_sensitive, #top_sensitive?, #unwrap, #write
Constructor Details
#initialize(expression) ⇒ ThrowNode
Returns a new instance of ThrowNode.
809 810 811 |
# File 'lib/nscript/parser/nodes.rb', line 809 def initialize(expression) @expression = expression end |
Instance Method Details
#compile_node(o) ⇒ Object
813 814 815 |
# File 'lib/nscript/parser/nodes.rb', line 813 def compile_node(o) write("#{idt}throw #{@expression.compile(o)};") end |