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

Side by Side Diff: src/messages.h

Issue 1793913002: [parser] implement error reporting for Scanner errors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 9 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') | src/parsing/parser-base.h » ('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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 T(UnexpectedTokenNumber, "Unexpected number") \ 455 T(UnexpectedTokenNumber, "Unexpected number") \
456 T(UnexpectedTokenString, "Unexpected string") \ 456 T(UnexpectedTokenString, "Unexpected string") \
457 T(UnexpectedTokenRegExp, "Unexpected regular expression") \ 457 T(UnexpectedTokenRegExp, "Unexpected regular expression") \
458 T(UnknownLabel, "Undefined label '%'") \ 458 T(UnknownLabel, "Undefined label '%'") \
459 T(UnterminatedArgList, "missing ) after argument list") \ 459 T(UnterminatedArgList, "missing ) after argument list") \
460 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ 460 T(UnterminatedRegExp, "Invalid regular expression: missing /") \
461 T(UnterminatedTemplate, "Unterminated template literal") \ 461 T(UnterminatedTemplate, "Unterminated template literal") \
462 T(UnterminatedTemplateExpr, "Missing } in template expression") \ 462 T(UnterminatedTemplateExpr, "Missing } in template expression") \
463 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ 463 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \
464 T(NonObjectInInstanceOfCheck, "Expecting an object in instanceof check") \ 464 T(NonObjectInInstanceOfCheck, "Expecting an object in instanceof check") \
465 T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \
466 T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \
467 T(UndefinedUnicodeCodePoint, "Undefined Unicode code-point") \
468 T(UnclosedUnicodeEscapeSequence, \
469 "Unclosed Unicode escape sequence --- Expected `}`") \
adamk 2016/03/18 18:21:55 This one is weird in a couple ways: - More tradit
caitp (gmail) 2016/03/21 16:15:03 I rewrote the message to match similar-ish message
465 /* EvalError */ \ 470 /* EvalError */ \
466 T(CodeGenFromStrings, "%") \ 471 T(CodeGenFromStrings, "%") \
467 /* URIError */ \ 472 /* URIError */ \
468 T(URIMalformed, "URI malformed") 473 T(URIMalformed, "URI malformed")
469 474
470 class MessageTemplate { 475 class MessageTemplate {
471 public: 476 public:
472 enum Template { 477 enum Template {
473 #define TEMPLATE(NAME, STRING) k##NAME, 478 #define TEMPLATE(NAME, STRING) k##NAME,
474 MESSAGE_TEMPLATES(TEMPLATE) 479 MESSAGE_TEMPLATES(TEMPLATE)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); 512 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data);
508 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, 513 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate,
509 Handle<Object> data); 514 Handle<Object> data);
510 }; 515 };
511 516
512 517
513 } // namespace internal 518 } // namespace internal
514 } // namespace v8 519 } // namespace v8
515 520
516 #endif // V8_MESSAGES_H_ 521 #endif // V8_MESSAGES_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | src/parsing/parser-base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698