|
| 1 | +// Error messages should be identical to V8. |
| 2 | +export const Messages = { |
| 3 | + UnexpectedToken: 'Unexpected token %0', |
| 4 | + UnexpectedNumber: 'Unexpected number', |
| 5 | + UnexpectedString: 'Unexpected string', |
| 6 | + UnexpectedIdentifier: 'Unexpected identifier', |
| 7 | + UnexpectedReserved: 'Unexpected reserved word', |
| 8 | + UnexpectedTemplate: 'Unexpected quasi %0', |
| 9 | + UnexpectedEOS: 'Unexpected end of input', |
| 10 | + NewlineAfterThrow: 'Illegal newline after throw', |
| 11 | + InvalidRegExp: 'Invalid regular expression', |
| 12 | + UnterminatedRegExp: 'Invalid regular expression: missing /', |
| 13 | + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', |
| 14 | + InvalidLHSInForIn: 'Invalid left-hand side in for-in', |
| 15 | + InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', |
| 16 | + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', |
| 17 | + NoCatchOrFinally: 'Missing catch or finally after try', |
| 18 | + UnknownLabel: 'Undefined label \'%0\'', |
| 19 | + Redeclaration: '%0 \'%1\' has already been declared', |
| 20 | + IllegalContinue: 'Illegal continue statement', |
| 21 | + IllegalBreak: 'Illegal break statement', |
| 22 | + IllegalReturn: 'Illegal return statement', |
| 23 | + StrictModeWith: 'Strict mode code may not include a with statement', |
| 24 | + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', |
| 25 | + StrictVarName: 'Variable name may not be eval or arguments in strict mode', |
| 26 | + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', |
| 27 | + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', |
| 28 | + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', |
| 29 | + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', |
| 30 | + StrictDelete: 'Delete of an unqualified identifier in strict mode.', |
| 31 | + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', |
| 32 | + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', |
| 33 | + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', |
| 34 | + StrictReservedWord: 'Use of future reserved word in strict mode', |
| 35 | + TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', |
| 36 | + ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', |
| 37 | + DefaultRestParameter: 'Unexpected token =', |
| 38 | + ObjectPatternAsRestParameter: 'Unexpected token {', |
| 39 | + DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', |
| 40 | + ConstructorSpecialMethod: 'Class constructor may not be an accessor', |
| 41 | + DuplicateConstructor: 'A class may only have one constructor', |
| 42 | + StaticPrototype: 'Classes may not have static property named prototype', |
| 43 | + MissingFromClause: 'Unexpected token', |
| 44 | + NoAsAfterImportNamespace: 'Unexpected token', |
| 45 | + InvalidModuleSpecifier: 'Unexpected token', |
| 46 | + IllegalImportDeclaration: 'Unexpected token', |
| 47 | + IllegalExportDeclaration: 'Unexpected token', |
| 48 | + DuplicateBinding: 'Duplicate binding %0' |
| 49 | +}; |
0 commit comments