| OLD | NEW |
| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 T(UnexpectedTokenIdentifier, "Unexpected identifier") \ | 457 T(UnexpectedTokenIdentifier, "Unexpected identifier") \ |
| 458 T(UnexpectedTokenNumber, "Unexpected number") \ | 458 T(UnexpectedTokenNumber, "Unexpected number") \ |
| 459 T(UnexpectedTokenString, "Unexpected string") \ | 459 T(UnexpectedTokenString, "Unexpected string") \ |
| 460 T(UnexpectedTokenRegExp, "Unexpected regular expression") \ | 460 T(UnexpectedTokenRegExp, "Unexpected regular expression") \ |
| 461 T(UnknownLabel, "Undefined label '%'") \ | 461 T(UnknownLabel, "Undefined label '%'") \ |
| 462 T(UnterminatedArgList, "missing ) after argument list") \ | 462 T(UnterminatedArgList, "missing ) after argument list") \ |
| 463 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ | 463 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ |
| 464 T(UnterminatedTemplate, "Unterminated template literal") \ | 464 T(UnterminatedTemplate, "Unterminated template literal") \ |
| 465 T(UnterminatedTemplateExpr, "Missing } in template expression") \ | 465 T(UnterminatedTemplateExpr, "Missing } in template expression") \ |
| 466 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ | 466 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ |
| 467 T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \ |
| 468 T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \ |
| 469 T(UndefinedUnicodeCodePoint, "Undefined Unicode code-point") \ |
| 467 /* EvalError */ \ | 470 /* EvalError */ \ |
| 468 T(CodeGenFromStrings, "%") \ | 471 T(CodeGenFromStrings, "%") \ |
| 469 /* URIError */ \ | 472 /* URIError */ \ |
| 470 T(URIMalformed, "URI malformed") | 473 T(URIMalformed, "URI malformed") |
| 471 | 474 |
| 472 class MessageTemplate { | 475 class MessageTemplate { |
| 473 public: | 476 public: |
| 474 enum Template { | 477 enum Template { |
| 475 #define TEMPLATE(NAME, STRING) k##NAME, | 478 #define TEMPLATE(NAME, STRING) k##NAME, |
| 476 MESSAGE_TEMPLATES(TEMPLATE) | 479 MESSAGE_TEMPLATES(TEMPLATE) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 512 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
| 510 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 513 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
| 511 Handle<Object> data); | 514 Handle<Object> data); |
| 512 }; | 515 }; |
| 513 | 516 |
| 514 | 517 |
| 515 } // namespace internal | 518 } // namespace internal |
| 516 } // namespace v8 | 519 } // namespace v8 |
| 517 | 520 |
| 518 #endif // V8_MESSAGES_H_ | 521 #endif // V8_MESSAGES_H_ |
| OLD | NEW |