michael@0: load(libdir + "asserts.js"); michael@0: michael@0: var offenders = [ michael@0: "(1 ... n)", michael@0: "[1 ... n]", michael@0: "(...x)", michael@0: "[...x for (x of y)]", michael@0: "[...x, x for (x of y)]", michael@0: "[...]", michael@0: "(...)", michael@0: "[...,]", michael@0: "[... ...[]]", michael@0: "(... ...[])", michael@0: "[x, ...]", michael@0: "(x, ...)" michael@0: ]; michael@0: for (var sample of offenders) { michael@0: assertThrowsInstanceOf(function () { eval(sample); }, SyntaxError); michael@0: }