| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 T(UnterminatedArgList, "missing ) after argument list") \ | 461 T(UnterminatedArgList, "missing ) after argument list") \ |
| 462 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ | 462 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ |
| 463 T(UnterminatedTemplate, "Unterminated template literal") \ | 463 T(UnterminatedTemplate, "Unterminated template literal") \ |
| 464 T(UnterminatedTemplateExpr, "Missing } in template expression") \ | 464 T(UnterminatedTemplateExpr, "Missing } in template expression") \ |
| 465 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ | 465 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ |
| 466 T(NonObjectInInstanceOfCheck, "Expecting an object in instanceof check") \ | 466 T(NonObjectInInstanceOfCheck, "Expecting an object in instanceof check") \ |
| 467 /* SyntaxError for the optional type system */ \ | 467 /* SyntaxError for the optional type system */ \ |
| 468 T(InvalidType, "Invalid type.") \ | 468 T(InvalidType, "Invalid type.") \ |
| 469 T(BadFunctionOrConstructorType, \ | 469 T(BadFunctionOrConstructorType, \ |
| 470 "Expecting '=>' in function or constructor type.") \ | 470 "Expecting '=>' in function or constructor type.") \ |
| 471 T(BadIndexType, "Invalid index type: expected 'number' or 'string'") \ |
| 471 /* EvalError */ \ | 472 /* EvalError */ \ |
| 472 T(CodeGenFromStrings, "%") \ | 473 T(CodeGenFromStrings, "%") \ |
| 473 /* URIError */ \ | 474 /* URIError */ \ |
| 474 T(URIMalformed, "URI malformed") | 475 T(URIMalformed, "URI malformed") |
| 475 | 476 |
| 476 class MessageTemplate { | 477 class MessageTemplate { |
| 477 public: | 478 public: |
| 478 enum Template { | 479 enum Template { |
| 479 #define TEMPLATE(NAME, STRING) k##NAME, | 480 #define TEMPLATE(NAME, STRING) k##NAME, |
| 480 MESSAGE_TEMPLATES(TEMPLATE) | 481 MESSAGE_TEMPLATES(TEMPLATE) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 514 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
| 514 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 515 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
| 515 Handle<Object> data); | 516 Handle<Object> data); |
| 516 }; | 517 }; |
| 517 | 518 |
| 518 | 519 |
| 519 } // namespace internal | 520 } // namespace internal |
| 520 } // namespace v8 | 521 } // namespace v8 |
| 521 | 522 |
| 522 #endif // V8_MESSAGES_H_ | 523 #endif // V8_MESSAGES_H_ |
| OLD | NEW |