Move newline handling down into parser.

This lets us make it a grammar feature and not a lexer trick.
Newlines are explicitly ignored in some parts of the grammar. This
lets, for example, things like "|" ignore the newline when used as
an operator, but not when used as a parameter delimiter in a block
argument.
This commit is contained in:
Bob Nystrom
2014-04-04 07:51:18 -07:00
parent da4cadf16b
commit 4a8cf3a7bf
23 changed files with 151 additions and 165 deletions
+4
View File
@@ -30,3 +30,7 @@ IO.print(123 is Class) // expect: false
// TODO: Non-class on RHS.
// TODO: Precedence and associativity.
// Ignore newline after "is".
IO.print(123 is
Num) // expect: true