class ComponentEmbeddedRuby::Parser::TokenReader
Public Class Methods
new(tokens)
click to toggle source
# File lib/component_embedded_ruby/parser/token_reader.rb, line 6 def initialize(tokens) @tokens = tokens @position = 0 end
Public Instance Methods
current_token()
click to toggle source
# File lib/component_embedded_ruby/parser/token_reader.rb, line 11 def current_token @tokens[@position] end
next()
click to toggle source
# File lib/component_embedded_ruby/parser/token_reader.rb, line 19 def next @position += 1 end
peek_token()
click to toggle source
# File lib/component_embedded_ruby/parser/token_reader.rb, line 15 def peek_token @tokens[@position + 1] end