Diff
Modified: trunk/LayoutTests/ChangeLog (200428 => 200429)
--- trunk/LayoutTests/ChangeLog 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/ChangeLog 2016-05-04 21:05:16 UTC (rev 200429)
@@ -1,3 +1,19 @@
+2016-05-04 Joseph Pecoraro <[email protected]>
+
+ Improve the grammar of some error messages 'a argument list' => 'an argument list'
+ https://bugs.webkit.org/show_bug.cgi?id=157350
+ <rdar://problem/26082108>
+
+ Reviewed by Mark Lam.
+
+ * fast/css/css-selector-text-expected.txt:
+ * inspector/runtime/parse-expected.txt:
+ * js/object-literal-computed-methods-expected.txt:
+ * js/object-literal-methods-expected.txt:
+ * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.12-expected.txt:
+ * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T1-expected.txt:
+ * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T2-expected.txt:
+
2016-05-04 Keith Miller <[email protected]>
Corrections to r200422
Modified: trunk/LayoutTests/fast/css/css-selector-text-expected.txt (200428 => 200429)
--- trunk/LayoutTests/fast/css/css-selector-text-expected.txt 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/fast/css/css-selector-text-expected.txt 2016-05-04 21:05:16 UTC (rev 200429)
@@ -400,7 +400,7 @@
PASS parseThenSerializeRule(':lang(*--) { }') threw exception TypeError: undefined is not an object (evaluating 'styleElement.sheet.cssRules[0].cssText').
PASS parseThenSerializeRule(':lang(*---) { }') threw exception TypeError: undefined is not an object (evaluating 'styleElement.sheet.cssRules[0].cssText').
PASS parseThenSerializeRule(':lang(*----) { }') threw exception TypeError: undefined is not an object (evaluating 'styleElement.sheet.cssRules[0].cssText').
-PASS parseThenSerializeRule(':lang(*)' { }) threw exception SyntaxError: Unexpected token '{'. Expected ')' to end a argument list..
+PASS parseThenSerializeRule(':lang(*)' { }) threw exception SyntaxError: Unexpected token '{'. Expected ')' to end an argument list..
PASS parseThenSerializeRule(':lang(**) { }') threw exception TypeError: undefined is not an object (evaluating 'styleElement.sheet.cssRules[0].cssText').
PASS parseThenSerializeRule(':lang(-*-) { }') threw exception TypeError: undefined is not an object (evaluating 'styleElement.sheet.cssRules[0].cssText').
PASS parseThenSerializeRule(':lang(*-*) { }') threw exception TypeError: undefined is not an object (evaluating 'styleElement.sheet.cssRules[0].cssText').
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (200428 => 200429)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-05-04 21:05:16 UTC (rev 200429)
@@ -1,3 +1,13 @@
+2016-05-04 Joseph Pecoraro <[email protected]>
+
+ Improve the grammar of some error messages 'a argument list' => 'an argument list'
+ https://bugs.webkit.org/show_bug.cgi?id=157350
+ <rdar://problem/26082108>
+
+ Reviewed by Mark Lam.
+
+ * web-platform-tests/html/dom/interfaces-expected.txt:
+
2016-05-01 Youenn Fablet <[email protected]>
Sync web-platform-tests up to revision 4af8373
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (200428 => 200429)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-05-04 21:05:16 UTC (rev 200429)
@@ -2722,27 +2722,27 @@
PASS TrackEvent interface: existence and properties of interface prototype object
PASS TrackEvent interface: existence and properties of interface prototype object's "constructor" property
PASS TrackEvent interface: attribute track
-FAIL TrackEvent must be primary interface of new TrackEvent("addtrack"; {track:document.createElement("track").track}) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Stringification of new TrackEvent("addtrack"; {track:document.createElement("track").track}) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL TrackEvent interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "track" with the proper type (0) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "type" with the proper type (0) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "target" with the proper type (1) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "currentTarget" with the proper type (2) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "NONE" with the proper type (3) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "CAPTURING_PHASE" with the proper type (4) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "AT_TARGET" with the proper type (5) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "BUBBLING_PHASE" with the proper type (6) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "eventPhase" with the proper type (7) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "stopPropagation" with the proper type (8) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "stopImmediatePropagation" with the proper type (9) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "bubbles" with the proper type (10) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "cancelable" with the proper type (11) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "preventDefault" with the proper type (12) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "defaultPrevented" with the proper type (13) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must have own property "isTrusted" assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "timeStamp" with the proper type (15) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "initEvent" with the proper type (16) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
-FAIL Event interface: calling initEvent(DOMString,boolean,boolean) on new TrackEvent("addtrack"; {track:document.createElement("track").track}) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end a ..."
+FAIL TrackEvent must be primary interface of new TrackEvent("addtrack"; {track:document.createElement("track").track}) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Stringification of new TrackEvent("addtrack"; {track:document.createElement("track").track}) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL TrackEvent interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "track" with the proper type (0) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "type" with the proper type (0) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "target" with the proper type (1) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "currentTarget" with the proper type (2) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "NONE" with the proper type (3) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "CAPTURING_PHASE" with the proper type (4) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "AT_TARGET" with the proper type (5) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "BUBBLING_PHASE" with the proper type (6) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "eventPhase" with the proper type (7) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "stopPropagation" with the proper type (8) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "stopImmediatePropagation" with the proper type (9) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "bubbles" with the proper type (10) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "cancelable" with the proper type (11) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "preventDefault" with the proper type (12) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "defaultPrevented" with the proper type (13) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must have own property "isTrusted" assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "timeStamp" with the proper type (15) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: new TrackEvent("addtrack"; {track:document.createElement("track").track}) must inherit property "initEvent" with the proper type (16) assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
+FAIL Event interface: calling initEvent(DOMString,boolean,boolean) on new TrackEvent("addtrack"; {track:document.createElement("track").track}) with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "SyntaxError: Unexpected token ';'. Expected ')' to end an..."
PASS HTMLMapElement interface: existence and properties of interface object
PASS HTMLMapElement interface object length
PASS HTMLMapElement interface object name
Modified: trunk/LayoutTests/inspector/runtime/parse-expected.txt (200428 => 200429)
--- trunk/LayoutTests/inspector/runtime/parse-expected.txt 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/inspector/runtime/parse-expected.txt 2016-05-04 21:05:16 UTC (rev 200429)
@@ -468,7 +468,7 @@
PASS: Should be SyntaxErrorType Irrecoverable.
Source: if x(1)
^
-Error Message: Unexpected identifier 'x'. Expected '(' to start a 'if' condition.
+Error Message: Unexpected identifier 'x'. Expected '(' to start an 'if' condition.
Error Range: {"startOffset":3,"endOffset":4}
Modified: trunk/LayoutTests/js/object-literal-computed-methods-expected.txt (200428 => 200429)
--- trunk/LayoutTests/js/object-literal-computed-methods-expected.txt 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/js/object-literal-computed-methods-expected.txt 2016-05-04 21:05:16 UTC (rev 200429)
@@ -56,7 +56,7 @@
PASS ({ [foo](,,,){} }) threw exception SyntaxError: Unexpected token ','. Expected a parameter pattern or a ')' in parameter list..
PASS ({ [foo](a{}, bar(){} }) threw exception SyntaxError: Unexpected token '{'. Expected a ')' or a ',' after a parameter declaration..
PASS ({ [foo](a, b), bar(){} }) threw exception SyntaxError: Unexpected token ','. Expected an opening '{' at the start of a method body..
-PASS ({ [foo](a, b) { if }, bar(){} }) threw exception SyntaxError: Unexpected token '}'. Expected '(' to start a 'if' condition..
+PASS ({ [foo](a, b) { if }, bar(){} }) threw exception SyntaxError: Unexpected token '}'. Expected '(' to start an 'if' condition..
PASS ({__proto__: function(){}}) instanceof Function is true
PASS ({['__proto__'](){}}) instanceof Function is false
PASS ({['__proto__'](){}}).__proto__ instanceof Function is true
Modified: trunk/LayoutTests/js/object-literal-methods-expected.txt (200428 => 200429)
--- trunk/LayoutTests/js/object-literal-methods-expected.txt 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/js/object-literal-methods-expected.txt 2016-05-04 21:05:16 UTC (rev 200429)
@@ -64,7 +64,7 @@
PASS ({ foo(,,,){} }) threw exception SyntaxError: Unexpected token ','. Expected a parameter pattern or a ')' in parameter list..
PASS ({ foo(a{}, bar(){} }) threw exception SyntaxError: Unexpected token '{'. Expected a ')' or a ',' after a parameter declaration..
PASS ({ foo(a, b), bar(){} }) threw exception SyntaxError: Unexpected token ','. Expected an opening '{' at the start of a method body..
-PASS ({ foo(a, b) { if }, bar(){} }) threw exception SyntaxError: Unexpected token '}'. Expected '(' to start a 'if' condition..
+PASS ({ foo(a, b) { if }, bar(){} }) threw exception SyntaxError: Unexpected token '}'. Expected '(' to start an 'if' condition..
PASS ({__proto__: function(){}}) instanceof Function is true
PASS ({__proto__(){}}) instanceof Function is false
PASS ({__proto__(){}}).__proto__ instanceof Function is true
Modified: trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.12-expected.txt (200428 => 200429)
--- trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.12-expected.txt 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.12-expected.txt 2016-05-04 21:05:16 UTC (rev 200429)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 76: SyntaxError: Unexpected token '='. Expected '(' to start a 'if' condition.
+CONSOLE MESSAGE: line 76: SyntaxError: Unexpected token '='. Expected '(' to start an 'if' condition.
S7.5.2_A1.12
PASS Expected parsing failure
Modified: trunk/LayoutTests/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T1-expected.txt (200428 => 200429)
--- trunk/LayoutTests/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T1-expected.txt 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T1-expected.txt 2016-05-04 21:05:16 UTC (rev 200429)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 78: SyntaxError: Unexpected keyword 'true'. Expected '(' to start a 'if' condition.
+CONSOLE MESSAGE: line 78: SyntaxError: Unexpected keyword 'true'. Expected '(' to start an 'if' condition.
S12.5_A6_T1
PASS Expected parsing failure
Modified: trunk/LayoutTests/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T2-expected.txt (200428 => 200429)
--- trunk/LayoutTests/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T2-expected.txt 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/LayoutTests/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T2-expected.txt 2016-05-04 21:05:16 UTC (rev 200429)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 78: SyntaxError: Unexpected keyword 'false'. Expected '(' to start a 'if' condition.
+CONSOLE MESSAGE: line 78: SyntaxError: Unexpected keyword 'false'. Expected '(' to start an 'if' condition.
S12.5_A6_T2
PASS Expected parsing failure
Modified: trunk/Source/_javascript_Core/ChangeLog (200428 => 200429)
--- trunk/Source/_javascript_Core/ChangeLog 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-05-04 21:05:16 UTC (rev 200429)
@@ -1,3 +1,21 @@
+2016-05-04 Joseph Pecoraro <[email protected]>
+
+ Improve the grammar of some error messages 'a argument list' => 'an argument list'
+ https://bugs.webkit.org/show_bug.cgi?id=157350
+ <rdar://problem/26082108>
+
+ Reviewed by Mark Lam.
+
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::parseIfStatement):
+ (JSC::Parser<LexerType>::parseImportDeclaration):
+ (JSC::Parser<LexerType>::parseExportDeclaration):
+ (JSC::Parser<LexerType>::parseObjectLiteral):
+ (JSC::Parser<LexerType>::parseStrictObjectLiteral):
+ (JSC::Parser<LexerType>::parseArguments):
+ Use the alternate error message formatter macro which outputs 'an'
+ instead of 'a' preceding the last argument.
+
2016-05-04 Keith Miller <[email protected]>
Corrections to r200422
Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (200428 => 200429)
--- trunk/Source/_javascript_Core/parser/Parser.cpp 2016-05-04 20:49:26 UTC (rev 200428)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp 2016-05-04 21:05:16 UTC (rev 200429)
@@ -69,6 +69,10 @@
consumeOrFail(token, "Expected '", tokenString, "' to ", operation, " a ", production);\
} while (0)
+#define handleProductionOrFail2(token, tokenString, operation, production) do {\
+ consumeOrFail(token, "Expected '", tokenString, "' to ", operation, " an ", production);\
+} while (0)
+
#define semanticFailureDueToKeyword(...) do { \
if (strictMode() && m_token.m_type == RESERVED_IF_STRICT) \
semanticFail("Cannot use the reserved word '", getToken(), "' as a ", __VA_ARGS__, " in strict mode"); \
@@ -2528,12 +2532,12 @@
JSTokenLocation ifLocation(tokenLocation());
int start = tokenLine();
next();
- handleProductionOrFail(OPENPAREN, "(", "start", "'if' condition");
+ handleProductionOrFail2(OPENPAREN, "(", "start", "'if' condition");
TreeExpression condition = parseExpression(context);
failIfFalse(condition, "Expected a _expression_ as the condition for an if statement");
int end = tokenLine();
- handleProductionOrFail(CLOSEPAREN, ")", "end", "'if' condition");
+ handleProductionOrFail2(CLOSEPAREN, ")", "end", "'if' condition");
const Identifier* unused = 0;
m_immediateParentAllowsFunctionDeclarationInStatement = true;
@@ -2563,12 +2567,12 @@
int innerStart = tokenLine();
next();
- handleProductionOrFail(OPENPAREN, "(", "start", "'if' condition");
+ handleProductionOrFail2(OPENPAREN, "(", "start", "'if' condition");
TreeExpression innerCondition = parseExpression(context);
failIfFalse(innerCondition, "Expected a _expression_ as the condition for an if statement");
int innerEnd = tokenLine();
- handleProductionOrFail(CLOSEPAREN, ")", "end", "'if' condition");
+ handleProductionOrFail2(CLOSEPAREN, ")", "end", "'if' condition");
const Identifier* unused = 0;
m_immediateParentAllowsFunctionDeclarationInStatement = true;
TreeStatement innerTrueBlock = parseStatement(context, unused);
@@ -2754,7 +2758,7 @@
if (!consume(COMMA))
break;
}
- handleProductionOrFail(CLOSEBRACE, "}", "end", "import list");
+ handleProductionOrFail2(CLOSEBRACE, "}", "end", "import list");
} else
failWithMessage("Expected namespace import or import list");
}
@@ -2916,7 +2920,7 @@
if (!consume(COMMA))
break;
}
- handleProductionOrFail(CLOSEBRACE, "}", "end", "export list");
+ handleProductionOrFail2(CLOSEBRACE, "}", "end", "export list");
typename TreeBuilder::ModuleName moduleName = 0;
if (matchContextualKeyword(m_vm->propertyNames->from)) {
@@ -3498,7 +3502,7 @@
}
location = tokenLocation();
- handleProductionOrFail(CLOSEBRACE, "}", "end", "object literal");
+ handleProductionOrFail2(CLOSEBRACE, "}", "end", "object literal");
m_parserState.nonLHSCount = oldNonLHSCount;
@@ -3544,7 +3548,7 @@
}
location = tokenLocation();
- handleProductionOrFail(CLOSEBRACE, "}", "end", "object literal");
+ handleProductionOrFail2(CLOSEBRACE, "}", "end", "object literal");
m_parserState.nonLHSCount = oldNonLHSCount;
@@ -3850,7 +3854,7 @@
tail = context.createArgumentsList(argumentLocation, tail, arg);
}
- handleProductionOrFail(CLOSEPAREN, ")", "end", "argument list");
+ handleProductionOrFail2(CLOSEPAREN, ")", "end", "argument list");
if (hasSpread) {
TreeExpression spreadArray = context.createSpreadExpression(location, context.createArray(location, context.createElementList(argList)), argumentsStart, argumentsDivot, m_lastTokenEndPosition);
return context.createArguments(context.createArgumentsList(location, spreadArray));