Messages.cs 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. namespace Jint.Parser
  2. {
  3. // Error messages should be identical to V8.
  4. public class Messages
  5. {
  6. public static string UnexpectedToken = "Unexpected token {0}";
  7. public static string UnexpectedNumber = "Unexpected number";
  8. public static string UnexpectedString = "Unexpected string";
  9. public static string UnexpectedIdentifier = "Unexpected identifier";
  10. public static string UnexpectedReserved = "Unexpected reserved word";
  11. public static string UnexpectedEOS = "Unexpected end of input";
  12. public static string NewlineAfterThrow = "Illegal newline after throw";
  13. public static string InvalidRegExp = "Invalid regular expression";
  14. public static string UnterminatedRegExp = "Invalid regular expression= missing /";
  15. public static string InvalidLHSInAssignment = "Invalid left-hand side in assignment";
  16. public static string InvalidLHSInForIn = "Invalid left-hand side in for-in";
  17. public static string MultipleDefaultsInSwitch = "More than one default clause in switch statement";
  18. public static string NoCatchOrFinally = "Missing catch or finally after try";
  19. public static string UnknownLabel = "Undefined label \"{0}\"";
  20. public static string Redeclaration = "{0} \"{1}\" has already been declared";
  21. public static string IllegalContinue = "Illegal continue statement";
  22. public static string IllegalBreak = "Illegal break statement";
  23. public static string IllegalReturn = "Illegal return statement";
  24. public static string StrictModeWith = "Strict mode code may not include a with statement";
  25. public static string StrictCatchVariable = "Catch variable may not be eval or arguments in strict mode";
  26. public static string StrictVarName = "Variable name may not be eval or arguments in strict mode";
  27. public static string StrictParamName = "Parameter name eval or arguments is not allowed in strict mode";
  28. public static string StrictParamDupe = "Strict mode function may not have duplicate parameter names";
  29. public static string StrictFunctionName = "Function name may not be eval or arguments in strict mode";
  30. public static string StrictOctalLiteral = "Octal literals are not allowed in strict mode.";
  31. public static string StrictDelete = "Delete of an unqualified identifier in strict mode.";
  32. public static string StrictDuplicateProperty = "Duplicate data property in object literal not allowed in strict mode";
  33. public static string AccessorDataProperty = "Object literal may not have data and accessor property with the same name";
  34. public static string AccessorGetSet = "Object literal may not have multiple get/set accessors with the same name";
  35. public static string StrictLHSAssignment = "Assignment to eval or arguments is not allowed in strict mode";
  36. public static string StrictLHSPostfix = "Postfix increment/decrement may not have eval or arguments operand in strict mode";
  37. public static string StrictLHSPrefix = "Prefix increment/decrement may not have eval or arguments operand in strict mode";
  38. public static string StrictReservedWord = "Use of future reserved word in strict mode";
  39. };
  40. }