feat: ignore newlines in import statements and add test for multiline imports

Add calls to ignoreNewlines in the import compiler function to allow
newlines between the import keyword and the module string, and between
the module string and the for clause. Create a new test case
test/language/module/newlines/ that verifies multiline import syntax
works correctly with both bare imports and imports with variable
bindings.
This commit is contained in:
Bob Nystrom
2015-12-08 03:41:10 +00:00
parent 9d2b4af508
commit 9dcba9f8b6
3 changed files with 22 additions and 0 deletions
@@ -0,0 +1,5 @@
// nontest
System.print("ran module")
var A = "a"
var B = "b"
@@ -0,0 +1,15 @@
import
"module"
import "module" for
A,
B
// expect: ran module
System.print(A) // expect: a
System.print(B) // expect: b