Class: ReVIEW::Compiler::Position

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(compiler) ⇒ Position

Returns a new instance of Position.



378
379
380
381
382
# File 'lib/review/compiler.rb', line 378

def initialize(compiler)
  @pos = compiler.pos
  @line = compiler.current_line
  @col = compiler.current_column
end

Instance Attribute Details

#colObject

Returns the value of attribute col.



377
378
379
# File 'lib/review/compiler.rb', line 377

def col
  @col
end

#lineObject

Returns the value of attribute line.



377
378
379
# File 'lib/review/compiler.rb', line 377

def line
  @line
end

#posObject

Returns the value of attribute pos.



377
378
379
# File 'lib/review/compiler.rb', line 377

def pos
  @pos
end