Class: Prattle::AST::False

Inherits:
Node
  • Object
show all
Defined in:
lib/prattle/ast/false.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#run

Constructor Details

#initializeFalse

Returns a new instance of False



10
11
# File 'lib/prattle/ast/false.rb', line 10

def initialize
end

Class Method Details

.grammar(g) ⇒ Object



13
14
15
# File 'lib/prattle/ast/false.rb', line 13

def self.grammar(g)
  g.false = g.str("false") { False.new }
end

.rule_nameObject



6
7
8
# File 'lib/prattle/ast/false.rb', line 6

def self.rule_name
  "false"
end

Instance Method Details

#bytecode(g) ⇒ Object



17
18
19
# File 'lib/prattle/ast/false.rb', line 17

def bytecode(g)
  g.push :false
end