Bug 1102131 - Part 1: Fix spelling of "LetExpresion". r=shu
authorChris Peterson <cpeterson@mozilla.com>
Sat, 15 Nov 2014 23:27:22 -0800
changeset 241294 fe4bdefa88d15456f9f98972b4e1881c83566761
parent 241293 3e56ff4fc166f403d22cf72ea211c9c207691018
child 241295 81f50ea78442e2856c3eb5c4c7143ce8b8eb4a5e
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs1102131
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1102131 - Part 1: Fix spelling of "LetExpresion". r=shu
js/src/frontend/Parser.cpp
js/src/frontend/Parser.h
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -3642,28 +3642,28 @@ Parser<ParseHandler>::letBlock(LetContex
             }
 
             /*
              * If this is really an expression in let statement guise, then we
              * need to wrap the PNK_LET node in a PNK_SEMI node so that we pop
              * the return value of the expression.
              */
             needExprStmt = true;
-            letContext = LetExpresion;
+            letContext = LetExpression;
         }
     }
 
     Node expr;
     if (letContext == LetStatement) {
         expr = statements();
         if (!expr)
             return null();
         MUST_MATCH_TOKEN(TOK_RC, JSMSG_CURLY_AFTER_LET);
     } else {
-        MOZ_ASSERT(letContext == LetExpresion);
+        MOZ_ASSERT(letContext == LetExpression);
         expr = assignExpr();
         if (!expr)
             return null();
     }
     handler.setLexicalScopeBody(block, expr);
     PopStatementPC(tokenStream, pc);
 
     handler.setEndPosition(pnlet, pos().end);
@@ -4333,17 +4333,17 @@ Parser<ParseHandler>::exportDeclaration(
         kid->pn_xflags = PNX_POPVAR;
 
         kid = MatchOrInsertSemicolon(tokenStream) ? kid : nullptr;
         if (!kid)
             return null();
         break;
 
       case TOK_NAME:
-        // Handle the form |export a} in the same way as |export let a|, by
+        // Handle the form |export a| in the same way as |export let a|, by
         // acting as if we've just seen the let keyword. Simply unget the token
         // and fall through.
         tokenStream.ungetToken();
       case TOK_LET:
       case TOK_CONST:
         kid = lexicalDeclaration(tt == TOK_CONST);
         if (!kid)
             return null();
@@ -4360,17 +4360,16 @@ Parser<ParseHandler>::exportDeclaration(
 template<>
 SyntaxParseHandler::Node
 Parser<SyntaxParseHandler>::exportDeclaration()
 {
     JS_ALWAYS_FALSE(abortIfSyntaxParser());
     return SyntaxParseHandler::NodeFailure;
 }
 
-
 template <typename ParseHandler>
 typename ParseHandler::Node
 Parser<ParseHandler>::expressionStatement()
 {
     tokenStream.ungetToken();
     Node pnexpr = expr();
     if (!pnexpr)
         return null();
@@ -4607,17 +4606,17 @@ Parser<FullParseHandler>::forStatement()
                 pn1 = variables(PNK_VAR);
             } else if (tt == TOK_LET || tt == TOK_CONST) {
                 handler.disableSyntaxParser();
                 bool constDecl = tt == TOK_CONST;
                 tokenStream.consumeKnownToken(tt);
                 if (!tokenStream.peekToken(&tt))
                     return null();
                 if (tt == TOK_LP) {
-                    pn1 = letBlock(LetExpresion);
+                    pn1 = letBlock(LetExpression);
                 } else {
                     isForDecl = true;
                     blockObj = StaticBlockObject::create(context);
                     if (!blockObj)
                         return null();
                     pn1 = variables(constDecl ? PNK_CONST : PNK_LET, nullptr, blockObj,
                                     DontHoistVars);
                 }
@@ -8075,17 +8074,17 @@ Parser<ParseHandler>::primaryExpr(TokenK
 
       case TOK_LB:
         return arrayInitializer();
 
       case TOK_LC:
         return objectLiteral();
 
       case TOK_LET:
-        return letBlock(LetExpresion);
+        return letBlock(LetExpression);
 
       case TOK_LP:
         return parenExprOrGeneratorComprehension();
 
       case TOK_TEMPLATE_HEAD:
         return templateLiteral();
 
       case TOK_NO_SUBS_TEMPLATE:
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -320,17 +320,17 @@ Directives::Directives(ParseContext<Pars
     asmJS_(parent->useAsmOrInsideUseAsm())
 {}
 
 template <typename ParseHandler>
 struct BindData;
 
 class CompExprTransplanter;
 
-enum LetContext { LetExpresion, LetStatement };
+enum LetContext { LetExpression, LetStatement };
 enum VarContext { HoistVars, DontHoistVars };
 enum FunctionType { Getter, Setter, Normal };
 
 template <typename ParseHandler>
 class Parser : private JS::AutoGCRooter, public StrictModeGetter
 {
   public:
     ExclusiveContext *const context;