Class: NScript::CommentNode
Constant Summary
Constants inherited from Node
Instance Method Summary collapse
- #compile_node(o = {}) ⇒ Object
-
#initialize(lines) ⇒ CommentNode
constructor
A new instance of CommentNode.
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(lines) ⇒ CommentNode
Returns a new instance of CommentNode.
189 190 191 |
# File 'lib/nscript/parser/nodes.rb', line 189 def initialize(lines) @lines = lines.value end |
Instance Method Details
#compile_node(o = {}) ⇒ Object
193 194 195 196 |
# File 'lib/nscript/parser/nodes.rb', line 193 def compile_node(o={}) delimiter = "\n#{idt}//" write("#{delimiter}#{@lines.join(delimiter)}") end |