Optionally raises an error if the next token is not of the expected type.
# File lib/rdoc/markup/parser.rb, line 445
def skip token_type, error = true
type, = get
return unless type # end of stream
return @current_token if token_type == type
unget
raise ParseError, "expected #{token_type} got #{@current_token.inspect}" if error
end