Inline Parser#next_token to avoid method dispatch

This commit is contained in:
Harry Brundage
2013-07-26 15:38:52 -04:00
parent bacacf2fd0
commit bf53e517f5
2 changed files with 19 additions and 34 deletions
-7
View File
@@ -45,11 +45,4 @@ class LexerTest < Test::Unit::TestCase
Lexer.new("%").tokenize
end
end
def test_next_token
l = Lexer.new('hi 5.0')
assert_equal [:id, 'hi'], l.next_token
assert_equal [:float, '5.0'], l.next_token
assert_nil l.next_token
end
end