summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/espree/lib/messages.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/espree/lib/messages.js')
-rw-r--r--tools/eslint/node_modules/espree/lib/messages.js99
1 files changed, 99 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/espree/lib/messages.js b/tools/eslint/node_modules/espree/lib/messages.js
new file mode 100644
index 0000000000..b0f324f87d
--- /dev/null
+++ b/tools/eslint/node_modules/espree/lib/messages.js
@@ -0,0 +1,99 @@
+/**
+ * @fileoverview Error messages returned by the parser.
+ * @author Nicholas C. Zakas
+ * @copyright 2014 Nicholas C. Zakas. All rights reserved.
+ * @copyright 2011-2013 Ariya Hidayat <ariya.hidayat@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+// None!
+
+//------------------------------------------------------------------------------
+// Public
+//------------------------------------------------------------------------------
+
+// error messages should be identical to V8 where possible
+module.exports = {
+ UnexpectedToken: "Unexpected token %0",
+ UnexpectedNumber: "Unexpected number",
+ UnexpectedString: "Unexpected string",
+ UnexpectedIdentifier: "Unexpected identifier",
+ UnexpectedReserved: "Unexpected reserved word",
+ UnexpectedTemplate: "Unexpected quasi %0",
+ UnexpectedEOS: "Unexpected end of input",
+ NewlineAfterThrow: "Illegal newline after throw",
+ InvalidRegExp: "Invalid regular expression",
+ InvalidRegExpFlag: "Invalid regular expression flag",
+ UnterminatedRegExp: "Invalid regular expression: missing /",
+ InvalidLHSInAssignment: "Invalid left-hand side in assignment",
+ InvalidLHSInFormalsList: "Invalid left-hand side in formals list",
+ InvalidLHSInForIn: "Invalid left-hand side in for-in",
+ MultipleDefaultsInSwitch: "More than one default clause in switch statement",
+ NoCatchOrFinally: "Missing catch or finally after try",
+ NoUnintializedConst: "Const must be initialized",
+ UnknownLabel: "Undefined label '%0'",
+ Redeclaration: "%0 '%1' has already been declared",
+ IllegalContinue: "Illegal continue statement",
+ IllegalBreak: "Illegal break statement",
+ IllegalReturn: "Illegal return statement",
+ IllegalYield: "Illegal yield expression",
+ IllegalSpread: "Illegal spread element",
+ StrictModeWith: "Strict mode code may not include a with statement",
+ StrictCatchVariable: "Catch variable may not be eval or arguments in strict mode",
+ StrictVarName: "Variable name may not be eval or arguments in strict mode",
+ StrictParamName: "Parameter name eval or arguments is not allowed in strict mode",
+ StrictParamDupe: "Strict mode function may not have duplicate parameter names",
+ TemplateOctalLiteral: "Octal literals are not allowed in template strings.",
+ ParameterAfterRestParameter: "Rest parameter must be last formal parameter",
+ DefaultRestParameter: "Rest parameter can not have a default value",
+ ElementAfterSpreadElement: "Spread must be the final element of an element list",
+ ObjectPatternAsRestParameter: "Invalid rest parameter",
+ ObjectPatternAsSpread: "Invalid spread argument",
+ StrictFunctionName: "Function name may not be eval or arguments in strict mode",
+ StrictOctalLiteral: "Octal literals are not allowed in strict mode.",
+ StrictDelete: "Delete of an unqualified identifier in strict mode.",
+ StrictDuplicateProperty: "Duplicate data property in object literal not allowed in strict mode",
+ DuplicatePrototypeProperty: "Duplicate '__proto__' property in object literal are not allowed",
+ ConstructorSpecialMethod: "Class constructor may not be an accessor",
+ DuplicateConstructor: "A class may only have one constructor",
+ StaticPrototype: "Classes may not have static property named prototype",
+ AccessorDataProperty: "Object literal may not have data and accessor property with the same name",
+ AccessorGetSet: "Object literal may not have multiple get/set accessors with the same name",
+ StrictLHSAssignment: "Assignment to eval or arguments is not allowed in strict mode",
+ StrictLHSPostfix: "Postfix increment/decrement may not have eval or arguments operand in strict mode",
+ StrictLHSPrefix: "Prefix increment/decrement may not have eval or arguments operand in strict mode",
+ StrictReservedWord: "Use of future reserved word in strict mode",
+ InvalidJSXAttributeValue: "JSX value should be either an expression or a quoted JSX text",
+ ExpectedJSXClosingTag: "Expected corresponding JSX closing tag for %0",
+ AdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag",
+ MissingFromClause: "Missing from clause",
+ NoAsAfterImportNamespace: "Missing as after import *",
+ InvalidModuleSpecifier: "Invalid module specifier",
+ IllegalImportDeclaration: "Illegal import declaration",
+ IllegalExportDeclaration: "Illegal export declaration"
+};