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

Side by Side Diff: src/messages.h

Issue 1871923003: Add parsing for ambient declarations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types-devel
Patch Set: Minor fixes to address code review comments Created 4 years, 8 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
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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 T(UnterminatedTemplateExpr, "Missing } in template expression") \ 474 T(UnterminatedTemplateExpr, "Missing } in template expression") \
475 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ 475 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \
476 T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \ 476 T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \
477 T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \ 477 T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \
478 T(UndefinedUnicodeCodePoint, "Undefined Unicode code-point") \ 478 T(UndefinedUnicodeCodePoint, "Undefined Unicode code-point") \
479 /* SyntaxError for the optional type system */ \ 479 /* SyntaxError for the optional type system */ \
480 T(InvalidType, "Invalid type.") \ 480 T(InvalidType, "Invalid type.") \
481 T(BadFunctionOrConstructorType, \ 481 T(BadFunctionOrConstructorType, \
482 "Expecting '=>' in function or constructor type.") \ 482 "Expecting '=>' in function or constructor type.") \
483 T(BadIndexType, "Invalid index type: expected 'number' or 'string'") \ 483 T(BadIndexType, "Invalid index type: expected 'number' or 'string'") \
484 T(BadAmbientDeclaration, \
485 "Invalid ambient: expected variable, function or class declaration") \
486 T(IllegalDeclare, \
487 "Unexpected 'declare', ambient declaration not allowed here") \
488 T(AmbientGetOrSet, "Unexpected 'get' or 'set' in ambient class declaration") \
484 /* EvalError */ \ 489 /* EvalError */ \
485 T(CodeGenFromStrings, "%") \ 490 T(CodeGenFromStrings, "%") \
486 /* URIError */ \ 491 /* URIError */ \
487 T(URIMalformed, "URI malformed") 492 T(URIMalformed, "URI malformed")
488 493
489 class MessageTemplate { 494 class MessageTemplate {
490 public: 495 public:
491 enum Template { 496 enum Template {
492 #define TEMPLATE(NAME, STRING) k##NAME, 497 #define TEMPLATE(NAME, STRING) k##NAME,
493 MESSAGE_TEMPLATES(TEMPLATE) 498 MESSAGE_TEMPLATES(TEMPLATE)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); 531 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data);
527 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, 532 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate,
528 Handle<Object> data); 533 Handle<Object> data);
529 }; 534 };
530 535
531 536
532 } // namespace internal 537 } // namespace internal
533 } // namespace v8 538 } // namespace v8
534 539
535 #endif // V8_MESSAGES_H_ 540 #endif // V8_MESSAGES_H_
OLDNEW
« no previous file with comments | « src/ast/scopes.h ('k') | src/parsing/parser.h » ('j') | src/parsing/preparser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698