mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
parser test raises some minor improvements (remove unnecessary ValueNode arrays, etc
This commit is contained in:
@@ -24,9 +24,9 @@ class LexerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_lexing_function_definition
|
||||
code = "x => x * x."
|
||||
assert @lex.tokenize(code) == [[:PARAM, "x"], ["=>", "=>"],
|
||||
[:IDENTIFIER, "x"], ["*", "*"], [:IDENTIFIER, "x"], [".", "."]]
|
||||
code = "x, y => x * y."
|
||||
assert @lex.tokenize(code) == [[:PARAM, "x"], [",", ","], [:PARAM, "y"],
|
||||
["=>", "=>"], [:IDENTIFIER, "x"], ["*", "*"], [:IDENTIFIER, "y"], [".", "."]]
|
||||
end
|
||||
|
||||
def test_lexing_if_statement
|
||||
|
||||
Reference in New Issue
Block a user