lib/rly/lex_token.rb in rly-0.2.1 vs lib/rly/lex_token.rb in rly-0.2.2

- old
+ new

@@ -1,14 +1,15 @@ module Rly class LexToken - attr_accessor :value - attr_reader :type, :lexer + attr_accessor :value, :type, :location_info + attr_reader :lexer - def initialize(type, value, lexer) + def initialize(type, value, lexer, pos=0, lineno=0, filename=nil) @type = type @value = value @lexer = lexer + @location_info = { pos: pos, lineno: lineno, filename: filename } end def to_s @value.to_s end