class NScript::LiteralNode
Constants
- STATEMENTS
Public Class Methods
new(value)
click to toggle source
# File lib/nscript/parser/nodes.rb, line 155 def initialize(value) @value = value end
wrap(string)
click to toggle source
# File lib/nscript/parser/nodes.rb, line 151 def self.wrap(string) self.new(Value.new(string)) end
Public Instance Methods
compile_node(o)
click to toggle source
# File lib/nscript/parser/nodes.rb, line 164 def compile_node(o) indent = statement? ? idt : '' ending = statement? ? ';' : '' "#{indent}#{@value}#{ending}" end
statement?()
click to toggle source
# File lib/nscript/parser/nodes.rb, line 159 def statement? STATEMENTS.include?(@value.to_s) end
Also aliased as: statement_only?