fix hard-to-catch commas in symbols compilation error
This commit is contained in:
@@ -251,7 +251,7 @@ class Reader {
|
||||
}
|
||||
|
||||
public static final whitespace = [" ", "\t", "\n"];
|
||||
public static final terminators = [")", "]", "}", '"', "/*"].concat(whitespace);
|
||||
public static final terminators = [")", "]", "}", '"', "/*", ","].concat(whitespace);
|
||||
|
||||
public static function nextToken(stream:Stream, expect:String, allowEmptyString = false) {
|
||||
switch (stream.takeUntilOneOf(terminators, true)) {
|
||||
|
12
src/test/cases/CommasInArgListTestCase.hx
Normal file
12
src/test/cases/CommasInArgListTestCase.hx
Normal file
@@ -0,0 +1,12 @@
|
||||
package test.cases;
|
||||
|
||||
import utest.Test;
|
||||
import utest.Assert;
|
||||
import kiss.Prelude;
|
||||
|
||||
@:build(kiss.Kiss.buildExpectingError(kiss.EType.EAny))
|
||||
class CommasInArgListTestCase extends Test {
|
||||
function testExpectedError() {
|
||||
_testExpectedError();
|
||||
}
|
||||
}
|
2
src/test/cases/CommasInArgListTestCase.kiss
Normal file
2
src/test/cases/CommasInArgListTestCase.kiss
Normal file
@@ -0,0 +1,2 @@
|
||||
(let [l ->[arg, arg2, arg3] null]
|
||||
(l 1 2 3))
|
Reference in New Issue
Block a user