Class: Parser::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/special-giggle/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, *args) ⇒ Token

Returns a new instance of Token.



7
8
9
# File 'lib/special-giggle/parser.rb', line 7

def initialize(type, *args)
  @type, @child = type, args
end

Instance Attribute Details

#childObject (readonly)

Returns the value of attribute child.



5
6
7
# File 'lib/special-giggle/parser.rb', line 5

def child
  @child
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/special-giggle/parser.rb', line 5

def type
  @type
end