empty?()
click to toggle source
def empty?
@tokens.empty?
end
make_parser(set, platforms)
click to toggle source
def make_parser(set, platforms)
Gem::RequestSet::Lockfile::Parser.new self, set, platforms, @filename
end
next_token()
click to toggle source
def next_token
@tokens.shift
end
peek()
click to toggle source
def peek
@tokens.first || EOF
end
shift()
click to toggle source
skip(type)
click to toggle source
def skip(type)
@tokens.shift while not @tokens.empty? and peek.type == type
end
to_a()
click to toggle source
def to_a
@tokens.map {|token| [token.type, token.value, token.column, token.line] }
end
unshift(token)
click to toggle source
def unshift(token)
@tokens.unshift token
end