Lines Matching refs:word
75 function testKeyword(word) { argument
77 assertEquals("keyword", classifyIdentifier(word));
80 assertThrows("var " + word + " = 1;", SyntaxError);
81 if (word != "this") {
82 assertThrows("typeof (" + word + ");", SyntaxError);
86 eval("var x = { " + word + " : 42 };");
87 eval("var x = { get " + word + " () {} };");
88 eval("var x = { set " + word + " (value) {} };");
91 eval("var x = { '" + word + "' : 42 };");
92 eval("var x = { get '" + word + "' () { } };");
93 eval("var x = { set '" + word + "' (value) { } };");
96 assertThrows("function " + word + " () { }", SyntaxError);
97 assertThrows("function foo (" + word + ") {}", SyntaxError);
98 assertThrows("function foo (a, " + word + ") { }", SyntaxError);
99 assertThrows("function foo (" + word + ", a) { }", SyntaxError);
100 assertThrows("function foo (a, " + word + ", b) { }", SyntaxError);
101 assertThrows("var foo = function (" + word + ") { }", SyntaxError);
104 assertThrows("var x = { set foo(" + word + ") { } };", SyntaxError);