Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: src/messages.h

Issue 2694003002: Raise SyntaxError on let [ starting an ExpressionStatement (Closed)
Patch Set: Only cover the ExpressionStatement case Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | test/mjsunit/invalid-source-element.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The infrastructure used for (localized) message reporting in V8. 5 // The infrastructure used for (localized) message reporting in V8.
6 // 6 //
7 // Note: there's a big unresolved issue about ownership of the data 7 // Note: there's a big unresolved issue about ownership of the data
8 // structures used by this framework. 8 // structures used by this framework.
9 9
10 #ifndef V8_MESSAGES_H_ 10 #ifndef V8_MESSAGES_H_
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 T(UnexpectedReserved, "Unexpected reserved word") \ 631 T(UnexpectedReserved, "Unexpected reserved word") \
632 T(UnexpectedStrictReserved, "Unexpected strict mode reserved word") \ 632 T(UnexpectedStrictReserved, "Unexpected strict mode reserved word") \
633 T(UnexpectedSuper, "'super' keyword unexpected here") \ 633 T(UnexpectedSuper, "'super' keyword unexpected here") \
634 T(UnexpectedNewTarget, "new.target expression is not allowed here") \ 634 T(UnexpectedNewTarget, "new.target expression is not allowed here") \
635 T(UnexpectedTemplateString, "Unexpected template string") \ 635 T(UnexpectedTemplateString, "Unexpected template string") \
636 T(UnexpectedToken, "Unexpected token %") \ 636 T(UnexpectedToken, "Unexpected token %") \
637 T(UnexpectedTokenIdentifier, "Unexpected identifier") \ 637 T(UnexpectedTokenIdentifier, "Unexpected identifier") \
638 T(UnexpectedTokenNumber, "Unexpected number") \ 638 T(UnexpectedTokenNumber, "Unexpected number") \
639 T(UnexpectedTokenString, "Unexpected string") \ 639 T(UnexpectedTokenString, "Unexpected string") \
640 T(UnexpectedTokenRegExp, "Unexpected regular expression") \ 640 T(UnexpectedTokenRegExp, "Unexpected regular expression") \
641 T(UnexpectedTokenLetLBrack, "Unexpected token sequence let [") \
Dan Ehrenberg 2017/02/16 09:16:51 From a user's perspective, the error they made was
vabr (Chromium) 2017/02/16 17:09:33 Thanks, that's a great point. I adopted the messag
641 T(UnknownLabel, "Undefined label '%'") \ 642 T(UnknownLabel, "Undefined label '%'") \
642 T(UnresolvableExport, \ 643 T(UnresolvableExport, \
643 "The requested module does not provide an export named '%'") \ 644 "The requested module does not provide an export named '%'") \
644 T(UnterminatedArgList, "missing ) after argument list") \ 645 T(UnterminatedArgList, "missing ) after argument list") \
645 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ 646 T(UnterminatedRegExp, "Invalid regular expression: missing /") \
646 T(UnterminatedTemplate, "Unterminated template literal") \ 647 T(UnterminatedTemplate, "Unterminated template literal") \
647 T(UnterminatedTemplateExpr, "Missing } in template expression") \ 648 T(UnterminatedTemplateExpr, "Missing } in template expression") \
648 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ 649 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \
649 T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \ 650 T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \
650 T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \ 651 T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 const MessageLocation* loc, 730 const MessageLocation* loc,
730 Handle<Object> message_obj, 731 Handle<Object> message_obj,
731 v8::Local<v8::Value> api_exception_obj); 732 v8::Local<v8::Value> api_exception_obj);
732 }; 733 };
733 734
734 735
735 } // namespace internal 736 } // namespace internal
736 } // namespace v8 737 } // namespace v8
737 738
738 #endif // V8_MESSAGES_H_ 739 #endif // V8_MESSAGES_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | test/mjsunit/invalid-source-element.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698