Class: Token

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, str, sourcefile, lineno = nil, column = nil) ⇒ Token

Returns a new instance of Token.



124
125
126
127
128
129
130
# File 'lib/nendo.rb', line 124

def initialize( kind, str, sourcefile, lineno = nil, column = nil )
  @kind       = kind
  @str        = str
  @sourcefile = sourcefile
  @lineno     = lineno
  @column     = column
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



131
132
133
# File 'lib/nendo.rb', line 131

def column
  @column
end

#kindObject

Returns the value of attribute kind.



131
132
133
# File 'lib/nendo.rb', line 131

def kind
  @kind
end

#linenoObject

Returns the value of attribute lineno.



131
132
133
# File 'lib/nendo.rb', line 131

def lineno
  @lineno
end

#sourcefileObject

Returns the value of attribute sourcefile.



131
132
133
# File 'lib/nendo.rb', line 131

def sourcefile
  @sourcefile
end

#strObject

Returns the value of attribute str.



131
132
133
# File 'lib/nendo.rb', line 131

def str
  @str
end