Class: Koara::Token

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind = 0, begin_line = nil, begin_column = nil, end_line = nil, end_column = nil, image = nil) ⇒ Token

Returns a new instance of Token.



12
13
14
15
16
17
18
19
# File 'lib/koara/token.rb', line 12

def initialize(kind = 0, begin_line = nil, begin_column = nil, end_line = nil, end_column = nil, image = nil)
  @kind = kind
  @begin_line = begin_line
  @begin_column = begin_column
  @end_line = end_line
  @end_column = end_column
  @image = image
end

Instance Attribute Details

#begin_columnObject

Returns the value of attribute begin_column.



6
7
8
# File 'lib/koara/token.rb', line 6

def begin_column
  @begin_column
end

#begin_lineObject

Returns the value of attribute begin_line.



5
6
7
# File 'lib/koara/token.rb', line 5

def begin_line
  @begin_line
end

#end_columnObject

Returns the value of attribute end_column.



8
9
10
# File 'lib/koara/token.rb', line 8

def end_column
  @end_column
end

#end_lineObject

Returns the value of attribute end_line.



7
8
9
# File 'lib/koara/token.rb', line 7

def end_line
  @end_line
end

#imageObject

Returns the value of attribute image.



9
10
11
# File 'lib/koara/token.rb', line 9

def image
  @image
end

#kindObject

Returns the value of attribute kind.



4
5
6
# File 'lib/koara/token.rb', line 4

def kind
  @kind
end

#nextObject

Returns the value of attribute next.



10
11
12
# File 'lib/koara/token.rb', line 10

def next
  @next
end