Changeset 239370 in webkit


Ignore:
Timestamp:
Dec 18, 2018 10:37:46 PM (5 years ago)
Author:
Ross Kirsling
Message:

Error message for -x ** y contains a typo.
https://bugs.webkit.org/show_bug.cgi?id=192832

Reviewed by Saam Barati.

JSTests:

  • ChakraCore/test/UnitTestFramework/UnitTestFramework.js:

(assert.assert.return.throws):

  • stress/pow-expects-update-expression-on-lhs.js:

(throw.new.Error):
Update test expectations which match against the exact error message.

Source/JavaScriptCore:

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseBinaryExpression):
Make corrections to error message: "amiguous" -> "ambiguous", "parenthesis" -> "parentheses"

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChakraCore/test/UnitTestFramework/UnitTestFramework.js

    r205387 r239370  
    367367                {
    368368                    regexp: /Invalid unary operator on the left hand side of exponentiation \(\*\*\) operator/,
    369                     replStr: "Unexpected token '**'. Amiguous unary expression in the left hand side of the exponentiation expression; parenthesis must be used to disambiguate the expression."
     369                    replStr: "Unexpected token '**'. Ambiguous unary expression in the left hand side of the exponentiation expression; parentheses must be used to disambiguate the expression."
    370370                },
    371371                {
  • trunk/JSTests/ChangeLog

    r239360 r239370  
     12018-12-18  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        Error message for `-x ** y` contains a typo.
     4        https://bugs.webkit.org/show_bug.cgi?id=192832
     5
     6        Reviewed by Saam Barati.
     7
     8        * ChakraCore/test/UnitTestFramework/UnitTestFramework.js:
     9        (assert.assert.return.throws):
     10        * stress/pow-expects-update-expression-on-lhs.js:
     11        (throw.new.Error):
     12        Update test expectations which match against the exact error message.
     13
    1142018-12-18  Mark Lam  <mark.lam@apple.com>
    215
  • trunk/JSTests/stress/pow-expects-update-expression-on-lhs.js

    r203664 r239370  
    3939            return ${token} a ** b;
    4040        }
    41         `, `SyntaxError: Unexpected token '**'. Amiguous unary expression in the left hand side of the exponentiation expression; parenthesis must be used to disambiguate the expression.`);
     41        `, `SyntaxError: Unexpected token '**'. Ambiguous unary expression in the left hand side of the exponentiation expression; parentheses must be used to disambiguate the expression.`);
    4242    }
    4343}
  • trunk/Source/JavaScriptCore/ChangeLog

    r239364 r239370  
     12018-12-18  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        Error message for `-x ** y` contains a typo.
     4        https://bugs.webkit.org/show_bug.cgi?id=192832
     5
     6        Reviewed by Saam Barati.
     7
     8        * parser/Parser.cpp:
     9        (JSC::Parser<LexerType>::parseBinaryExpression):
     10        Make corrections to error message: "amiguous" -> "ambiguous", "parenthesis" -> "parentheses"
     11
    1122018-12-18  Saam Barati  <sbarati@apple.com>
    213
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r239354 r239370  
    38873887        // If the binary operator <> has higher precedence than one of "**", this check does not work.
    38883888        // But it's OK for ** because the operator "**" has the highest operator precedence in the binary operators.
    3889         failIfTrue(match(POW) && isUnaryOpExcludingUpdateOp(leadingTokenTypeForUnaryExpression), "Amiguous unary expression in the left hand side of the exponentiation expression; parenthesis must be used to disambiguate the expression");
     3889        failIfTrue(match(POW) && isUnaryOpExcludingUpdateOp(leadingTokenTypeForUnaryExpression), "Ambiguous unary expression in the left hand side of the exponentiation expression; parentheses must be used to disambiguate the expression");
    38903890
    38913891        int precedence = isBinaryOperator(m_token.m_type);
Note: See TracChangeset for help on using the changeset viewer.