Class: NScript::IndexNode
Constant Summary
Constants inherited from Node
Instance Method Summary collapse
- #compile_node(o) ⇒ Object
-
#initialize(index) ⇒ IndexNode
constructor
A new instance of IndexNode.
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(index) ⇒ IndexNode
Returns a new instance of IndexNode.
361 362 363 |
# File 'lib/nscript/parser/nodes.rb', line 361 def initialize(index) @index = index end |
Instance Method Details
#compile_node(o) ⇒ Object
365 366 367 |
# File 'lib/nscript/parser/nodes.rb', line 365 def compile_node(o) write("[#{@index.compile(o)}]") end |