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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 T(MalformedArrowFunParamList, "Malformed arrow function parameter list") \ | 313 T(MalformedArrowFunParamList, "Malformed arrow function parameter list") \ |
314 T(MalformedRegExp, "Invalid regular expression: /%/: %") \ | 314 T(MalformedRegExp, "Invalid regular expression: /%/: %") \ |
315 T(MalformedRegExpFlags, "Invalid regular expression flags") \ | 315 T(MalformedRegExpFlags, "Invalid regular expression flags") \ |
316 T(ModuleExportUndefined, "Export '%' is not defined in module") \ | 316 T(ModuleExportUndefined, "Export '%' is not defined in module") \ |
317 T(MultipleDefaultsInSwitch, \ | 317 T(MultipleDefaultsInSwitch, \ |
318 "More than one default clause in switch statement") \ | 318 "More than one default clause in switch statement") \ |
319 T(NewlineAfterThrow, "Illegal newline after throw") \ | 319 T(NewlineAfterThrow, "Illegal newline after throw") \ |
320 T(NoCatchOrFinally, "Missing catch or finally after try") \ | 320 T(NoCatchOrFinally, "Missing catch or finally after try") \ |
321 T(NotIsvar, "builtin %%IS_VAR: not a variable") \ | 321 T(NotIsvar, "builtin %%IS_VAR: not a variable") \ |
322 T(ParamAfterRest, "Rest parameter must be last formal parameter") \ | 322 T(ParamAfterRest, "Rest parameter must be last formal parameter") \ |
| 323 T(BadSetterRestParameter, \ |
| 324 "Setter function argument must not be a rest parameter") \ |
323 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ | 325 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ |
324 T(SingleFunctionLiteral, "Single function literal required") \ | 326 T(SingleFunctionLiteral, "Single function literal required") \ |
325 T(SloppyLexical, \ | 327 T(SloppyLexical, \ |
326 "Block-scoped declarations (let, const, function, class) not yet " \ | 328 "Block-scoped declarations (let, const, function, class) not yet " \ |
327 "supported outside strict mode") \ | 329 "supported outside strict mode") \ |
328 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ | 330 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ |
329 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ | 331 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ |
330 T(StrictFunction, \ | 332 T(StrictFunction, \ |
331 "In strict mode code, functions can only be declared at top level or " \ | 333 "In strict mode code, functions can only be declared at top level or " \ |
332 "immediately within another function.") \ | 334 "immediately within another function.") \ |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 | 439 |
438 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, | 440 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, |
439 Handle<Object> message_obj); | 441 Handle<Object> message_obj); |
440 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 442 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
441 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 443 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
442 Handle<Object> data); | 444 Handle<Object> data); |
443 }; | 445 }; |
444 } } // namespace v8::internal | 446 } } // namespace v8::internal |
445 | 447 |
446 #endif // V8_MESSAGES_H_ | 448 #endif // V8_MESSAGES_H_ |
OLD | NEW |