Class: Serpent::Node::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/serpent/node.rb

Instance Method Summary collapse

Constructor Details

#initialize(val, metadata) ⇒ Token

Returns a new instance of Token.



19
20
21
22
# File 'lib/serpent/node.rb', line 19

def initialize(val, )
  @val = val
  @metadata = 
end

Instance Method Details

#outObject



24
25
26
# File 'lib/serpent/node.rb', line 24

def out
  [0, @val, @metadata.out]
end

#to_sObject Also known as: inspect



28
29
30
# File 'lib/serpent/node.rb', line 28

def to_s
  @val.to_s
end