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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 T(UnexpectedToken, "Unexpected token %") \ | 407 T(UnexpectedToken, "Unexpected token %") \ |
408 T(UnexpectedTokenIdentifier, "Unexpected identifier") \ | 408 T(UnexpectedTokenIdentifier, "Unexpected identifier") \ |
409 T(UnexpectedTokenNumber, "Unexpected number") \ | 409 T(UnexpectedTokenNumber, "Unexpected number") \ |
410 T(UnexpectedTokenString, "Unexpected string") \ | 410 T(UnexpectedTokenString, "Unexpected string") \ |
411 T(UnexpectedTokenRegExp, "Unexpected regular expression") \ | 411 T(UnexpectedTokenRegExp, "Unexpected regular expression") \ |
412 T(UnknownLabel, "Undefined label '%'") \ | 412 T(UnknownLabel, "Undefined label '%'") \ |
413 T(UnterminatedArgList, "missing ) after argument list") \ | 413 T(UnterminatedArgList, "missing ) after argument list") \ |
414 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ | 414 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ |
415 T(UnterminatedTemplate, "Unterminated template literal") \ | 415 T(UnterminatedTemplate, "Unterminated template literal") \ |
416 T(UnterminatedTemplateExpr, "Missing } in template expression") \ | 416 T(UnterminatedTemplateExpr, "Missing } in template expression") \ |
| 417 T(IllegalLanguageModeDirective, \ |
| 418 "Illegal '%' directive in function with non-simple parameter list") \ |
417 /* EvalError */ \ | 419 /* EvalError */ \ |
418 T(CodeGenFromStrings, "%") \ | 420 T(CodeGenFromStrings, "%") \ |
419 /* URIError */ \ | 421 /* URIError */ \ |
420 T(URIMalformed, "URI malformed") | 422 T(URIMalformed, "URI malformed") |
421 | 423 |
422 class MessageTemplate { | 424 class MessageTemplate { |
423 public: | 425 public: |
424 enum Template { | 426 enum Template { |
425 #define TEMPLATE(NAME, STRING) k##NAME, | 427 #define TEMPLATE(NAME, STRING) k##NAME, |
426 MESSAGE_TEMPLATES(TEMPLATE) | 428 MESSAGE_TEMPLATES(TEMPLATE) |
(...skipping 26 matching lines...) Expand all Loading... |
453 | 455 |
454 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, | 456 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, |
455 Handle<Object> message_obj); | 457 Handle<Object> message_obj); |
456 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 458 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
457 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 459 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
458 Handle<Object> data); | 460 Handle<Object> data); |
459 }; | 461 }; |
460 } } // namespace v8::internal | 462 } } // namespace v8::internal |
461 | 463 |
462 #endif // V8_MESSAGES_H_ | 464 #endif // V8_MESSAGES_H_ |
OLD | NEW |