Add internal ESLint rule for consistent parser error messages (#13130)
This commit is contained in:
parent
bf14a106ad
commit
2521c666f7
@ -109,6 +109,7 @@ module.exports = {
|
||||
),
|
||||
},
|
||||
],
|
||||
"@babel/development-internal/report-error-message-format": "error",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@ -68,3 +68,42 @@ and
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### `@babel/development-internal/report-error-message-format`
|
||||
|
||||
This rule is inspired by https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/docs/rules/report-message-format.md.
|
||||
|
||||
Intended for use in `packages/babel-parser/src/**/*`. When enabled, this rule warns for inconsistently error messages format in arguments of `makeErrorTemplates` function calls.
|
||||
|
||||
Basically, it starts with an uppercase Latin letter(A~Z) and ends with a period(.) or a question(?). But it can start with `'keyword'` or `` `code` `` to include JavaScript keywords or code in error messages.
|
||||
|
||||
valid:
|
||||
|
||||
```js
|
||||
makeErrorTemplates({ ThisIsAnError: "This is an error." });
|
||||
makeErrorTemplates({ ThisIsAnError: "'this' is an error." });
|
||||
makeErrorTemplates({ ThisIsAnError: "`this` is an error." });
|
||||
makeErrorTemplates({ ThisIsAnError: "This is an error?" });
|
||||
makeErrorTemplates({ ThisIsAnError: "'this' is an error?" });
|
||||
makeErrorTemplates({ ThisIsAnError: "`this` is an error?" });
|
||||
```
|
||||
|
||||
invalid:
|
||||
|
||||
```js
|
||||
makeErrorTemplates({ ThisIsAnError: 'this is an error.' });
|
||||
makeErrorTemplates({ ThisIsAnError: 'This is an error' });
|
||||
makeErrorTemplates({ ThisIsAnError: 'this is an error?' });
|
||||
makeErrorTemplates({ ThisIsAnError: '`this` is an error' });
|
||||
makeErrorTemplates({ ThisIsAnError: "'this' is an error" });
|
||||
```
|
||||
|
||||
Example configuration:
|
||||
|
||||
```js
|
||||
{
|
||||
rules: {
|
||||
"@babel/development-internal/report-error-message-format": "error"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import dryErrorMessages from "./rules/dry-error-messages";
|
||||
import reportErrorMessageFormat from "./rules/report-error-message-format";
|
||||
|
||||
export const rules = {
|
||||
"dry-error-messages": dryErrorMessages,
|
||||
"report-error-message-format": reportErrorMessageFormat,
|
||||
};
|
||||
|
||||
export default { rules };
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
const messageId = "mustMatchPattern";
|
||||
|
||||
const pattern = /(('.*')|(`.*`)|[A-Z]).*(\.|\?)$/s;
|
||||
|
||||
export default {
|
||||
meta: {
|
||||
type: "suggestion",
|
||||
docs: {
|
||||
description: "enforce @babel/parser's error message formatting.",
|
||||
},
|
||||
messages: {
|
||||
[messageId]: `Report message does not match the pattern ${pattern.toString()}.`,
|
||||
},
|
||||
},
|
||||
create({ report }) {
|
||||
return {
|
||||
"CallExpression[callee.type='Identifier'][callee.name='makeErrorTemplates'] > ObjectExpression > Property[value.type='Literal']"(
|
||||
node,
|
||||
) {
|
||||
const { value } = node;
|
||||
if (typeof value.value === "string" && pattern.test(value.value)) {
|
||||
return;
|
||||
}
|
||||
report({
|
||||
node: value,
|
||||
messageId,
|
||||
});
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
@ -0,0 +1,44 @@
|
||||
import RuleTester from "../../../babel-eslint-shared-fixtures/utils/RuleTester";
|
||||
import rule from "../../src/rules/report-error-message-format";
|
||||
|
||||
const ruleTester = new RuleTester();
|
||||
|
||||
ruleTester.run("report-error-message-format", rule, {
|
||||
valid: [
|
||||
"makeErrorTemplates({});",
|
||||
'makeErrorTemplates({ ThisIsAnError: "This is an error." });',
|
||||
`makeErrorTemplates({ ThisIsAnError: "'this' is an error." });`,
|
||||
`makeErrorTemplates({ ThisIsAnError: "\`this\` is an error." });`,
|
||||
`makeErrorTemplates({ ThisIsAnError: "This is an error?" });`,
|
||||
`makeErrorTemplates({ ThisIsAnError: "'this' is an error?" });`,
|
||||
`makeErrorTemplates({ ThisIsAnError: "\`this\` is an error?" });`,
|
||||
'makeErrorTemplates({ ThisIsAnError: "This is\\nan error." });',
|
||||
`makeErrorTemplates({ ThisIsAnError: "'this' is\\nan error." });`,
|
||||
`makeErrorTemplates({ ThisIsAnError: "\`this\` is\\nan error." });`,
|
||||
`makeErrorTemplates({ ThisIsAnError: "This is\\nan error?" });`,
|
||||
`makeErrorTemplates({ ThisIsAnError: "'this' is\\nan error?" });`,
|
||||
`makeErrorTemplates({ ThisIsAnError: "\`this\` is\\nan error?" });`,
|
||||
],
|
||||
invalid: [
|
||||
{
|
||||
code: "makeErrorTemplates({ ThisIsAnError: 'this is an error.' });",
|
||||
errors: [{ messageId: "mustMatchPattern" }],
|
||||
},
|
||||
{
|
||||
code: "makeErrorTemplates({ ThisIsAnError: 'This is an error' });",
|
||||
errors: [{ messageId: "mustMatchPattern" }],
|
||||
},
|
||||
{
|
||||
code: "makeErrorTemplates({ ThisIsAnError: 'this is an error?' });",
|
||||
errors: [{ messageId: "mustMatchPattern" }],
|
||||
},
|
||||
{
|
||||
code: "makeErrorTemplates({ ThisIsAnError: '`this` is an error' });",
|
||||
errors: [{ messageId: "mustMatchPattern" }],
|
||||
},
|
||||
{
|
||||
code: `makeErrorTemplates({ ThisIsAnError: "'this' is an error" });`,
|
||||
errors: [{ messageId: "mustMatchPattern" }],
|
||||
},
|
||||
],
|
||||
});
|
||||
@ -1 +1 @@
|
||||
SyntaxError: <CWD>\test.js: Missing semicolon (2:10)
|
||||
SyntaxError: <CWD>\test.js: Missing semicolon. (2:10)
|
||||
|
||||
@ -1 +1 @@
|
||||
SyntaxError: <CWD>/test.js: Missing semicolon (2:10)
|
||||
SyntaxError: <CWD>/test.js: Missing semicolon. (2:10)
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Missing semicolon (2:10)"
|
||||
"throws": "Missing semicolon. (2:10)"
|
||||
}
|
||||
|
||||
@ -11,217 +11,218 @@ import { makeErrorTemplates, ErrorCodes } from "./error";
|
||||
// The Errors key follows https://cs.chromium.org/chromium/src/v8/src/common/message-template.h unless it does not exist
|
||||
export const ErrorMessages = makeErrorTemplates(
|
||||
{
|
||||
AccessorIsGenerator: "A %0ter cannot be a generator",
|
||||
AccessorIsGenerator: "A %0ter cannot be a generator.",
|
||||
ArgumentsInClass:
|
||||
"'arguments' is only allowed in functions and class methods",
|
||||
"'arguments' is only allowed in functions and class methods.",
|
||||
AsyncFunctionInSingleStatementContext:
|
||||
"Async functions can only be declared at the top level or inside a block",
|
||||
"Async functions can only be declared at the top level or inside a block.",
|
||||
AwaitBindingIdentifier:
|
||||
"Can not use 'await' as identifier inside an async function",
|
||||
"Can not use 'await' as identifier inside an async function.",
|
||||
AwaitBindingIdentifierInStaticBlock:
|
||||
"Can not use 'await' as identifier inside a static block",
|
||||
"Can not use 'await' as identifier inside a static block.",
|
||||
AwaitExpressionFormalParameter:
|
||||
"await is not allowed in async function parameters",
|
||||
"'await' is not allowed in async function parameters.",
|
||||
AwaitNotInAsyncContext:
|
||||
"'await' is only allowed within async functions and at the top levels of modules",
|
||||
AwaitNotInAsyncFunction: "'await' is only allowed within async functions",
|
||||
BadGetterArity: "getter must not have any formal parameters",
|
||||
BadSetterArity: "setter must have exactly one formal parameter",
|
||||
"'await' is only allowed within async functions and at the top levels of modules.",
|
||||
AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
|
||||
BadGetterArity: "A 'get' accesor must not have any formal parameters.",
|
||||
BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
|
||||
BadSetterRestParameter:
|
||||
"setter function argument must not be a rest parameter",
|
||||
ConstructorClassField: "Classes may not have a field named 'constructor'",
|
||||
"A 'set' accesor function argument must not be a rest parameter.",
|
||||
ConstructorClassField: "Classes may not have a field named 'constructor'.",
|
||||
ConstructorClassPrivateField:
|
||||
"Classes may not have a private field named '#constructor'",
|
||||
ConstructorIsAccessor: "Class constructor may not be an accessor",
|
||||
ConstructorIsAsync: "Constructor can't be an async function",
|
||||
ConstructorIsGenerator: "Constructor can't be a generator",
|
||||
DeclarationMissingInitializer: "%0 require an initialization value",
|
||||
"Classes may not have a private field named '#constructor'.",
|
||||
ConstructorIsAccessor: "Class constructor may not be an accessor.",
|
||||
ConstructorIsAsync: "Constructor can't be an async function.",
|
||||
ConstructorIsGenerator: "Constructor can't be a generator.",
|
||||
DeclarationMissingInitializer: "'%0' require an initialization value.",
|
||||
DecoratorBeforeExport:
|
||||
"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax",
|
||||
"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
|
||||
DecoratorConstructor:
|
||||
"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
|
||||
DecoratorExportClass:
|
||||
"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
|
||||
DecoratorSemicolon: "Decorators must not be followed by a semicolon",
|
||||
DecoratorStaticBlock: "Decorators can't be used with a static block",
|
||||
DeletePrivateField: "Deleting a private field is not allowed",
|
||||
DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
|
||||
DecoratorStaticBlock: "Decorators can't be used with a static block.",
|
||||
DeletePrivateField: "Deleting a private field is not allowed.",
|
||||
DestructureNamedImport:
|
||||
"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
|
||||
DuplicateConstructor: "Duplicate constructor in the same class",
|
||||
DuplicateConstructor: "Duplicate constructor in the same class.",
|
||||
DuplicateDefaultExport: "Only one default export allowed per module.",
|
||||
DuplicateExport:
|
||||
"`%0` has already been exported. Exported identifiers must be unique.",
|
||||
DuplicateProto: "Redefinition of __proto__ property",
|
||||
DuplicateRegExpFlags: "Duplicate regular expression flag",
|
||||
ElementAfterRest: "Rest element must be last element",
|
||||
EscapedCharNotAnIdentifier: "Invalid Unicode escape",
|
||||
DuplicateProto: "Redefinition of __proto__ property.",
|
||||
DuplicateRegExpFlags: "Duplicate regular expression flag.",
|
||||
ElementAfterRest: "Rest element must be last element.",
|
||||
EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
|
||||
ExportBindingIsString:
|
||||
"A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
|
||||
ExportDefaultFromAsIdentifier:
|
||||
"'from' is not allowed as an identifier after 'export default'",
|
||||
"'from' is not allowed as an identifier after 'export default'.",
|
||||
ForInOfLoopInitializer:
|
||||
"%0 loop variable declaration may not have an initializer",
|
||||
"'%0' loop variable declaration may not have an initializer.",
|
||||
ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
|
||||
GeneratorInSingleStatementContext:
|
||||
"Generators can only be declared at the top level or inside a block",
|
||||
IllegalBreakContinue: "Unsyntactic %0",
|
||||
"Generators can only be declared at the top level or inside a block.",
|
||||
IllegalBreakContinue: "Unsyntactic %0.",
|
||||
IllegalLanguageModeDirective:
|
||||
"Illegal 'use strict' directive in function with non-simple parameter list",
|
||||
IllegalReturn: "'return' outside of function",
|
||||
"Illegal 'use strict' directive in function with non-simple parameter list.",
|
||||
IllegalReturn: "'return' outside of function.",
|
||||
ImportBindingIsString:
|
||||
'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
|
||||
ImportCallArgumentTrailingComma:
|
||||
"Trailing comma is disallowed inside import(...) arguments",
|
||||
ImportCallArity: "import() requires exactly %0",
|
||||
ImportCallNotNewExpression: "Cannot use new with import(...)",
|
||||
ImportCallSpreadArgument: "... is not allowed in import()",
|
||||
InvalidBigIntLiteral: "Invalid BigIntLiteral",
|
||||
InvalidCodePoint: "Code point out of bounds",
|
||||
InvalidDecimal: "Invalid decimal",
|
||||
InvalidDigit: "Expected number in radix %0",
|
||||
InvalidEscapeSequence: "Bad character escape sequence",
|
||||
InvalidEscapeSequenceTemplate: "Invalid escape sequence in template",
|
||||
InvalidEscapedReservedWord: "Escape sequence in keyword %0",
|
||||
InvalidIdentifier: "Invalid identifier %0",
|
||||
InvalidLhs: "Invalid left-hand side in %0",
|
||||
InvalidLhsBinding: "Binding invalid left-hand side in %0",
|
||||
InvalidNumber: "Invalid number",
|
||||
"Trailing comma is disallowed inside import(...) arguments.",
|
||||
ImportCallArity: "`import()` requires exactly %0.",
|
||||
ImportCallNotNewExpression: "Cannot use new with import(...).",
|
||||
ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
|
||||
InvalidBigIntLiteral: "Invalid BigIntLiteral.",
|
||||
InvalidCodePoint: "Code point out of bounds.",
|
||||
InvalidDecimal: "Invalid decimal.",
|
||||
InvalidDigit: "Expected number in radix %0.",
|
||||
InvalidEscapeSequence: "Bad character escape sequence.",
|
||||
InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
|
||||
InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
|
||||
InvalidIdentifier: "Invalid identifier %0.",
|
||||
InvalidLhs: "Invalid left-hand side in %0.",
|
||||
InvalidLhsBinding: "Binding invalid left-hand side in %0.",
|
||||
InvalidNumber: "Invalid number.",
|
||||
InvalidOrMissingExponent:
|
||||
"Floating-point numbers require a valid exponent after the 'e'",
|
||||
InvalidOrUnexpectedToken: "Unexpected character '%0'",
|
||||
InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern",
|
||||
InvalidPrivateFieldResolution: "Private name #%0 is not defined",
|
||||
InvalidPropertyBindingPattern: "Binding member expression",
|
||||
"Floating-point numbers require a valid exponent after the 'e'.",
|
||||
InvalidOrUnexpectedToken: "Unexpected character '%0'.",
|
||||
InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
|
||||
InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
|
||||
InvalidPropertyBindingPattern: "Binding member expression.",
|
||||
InvalidRecordProperty:
|
||||
"Only properties and spread elements are allowed in record definitions",
|
||||
InvalidRestAssignmentPattern: "Invalid rest operator's argument",
|
||||
LabelRedeclaration: "Label '%0' is already declared",
|
||||
"Only properties and spread elements are allowed in record definitions.",
|
||||
InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
|
||||
LabelRedeclaration: "Label '%0' is already declared.",
|
||||
LetInLexicalBinding:
|
||||
"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
|
||||
LineTerminatorBeforeArrow: "No line break is allowed before '=>'",
|
||||
MalformedRegExpFlags: "Invalid regular expression flag",
|
||||
MissingClassName: "A class name is required",
|
||||
LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
|
||||
MalformedRegExpFlags: "Invalid regular expression flag.",
|
||||
MissingClassName: "A class name is required.",
|
||||
MissingEqInAssignment:
|
||||
"Only '=' operator can be used for specifying default value.",
|
||||
MissingSemicolon: "Missing semicolon",
|
||||
MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX",
|
||||
MissingSemicolon: "Missing semicolon.",
|
||||
MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
|
||||
MixingCoalesceWithLogical:
|
||||
"Nullish coalescing operator(??) requires parens when mixing with logical operators",
|
||||
"Nullish coalescing operator(??) requires parens when mixing with logical operators.",
|
||||
ModuleAttributeDifferentFromType:
|
||||
"The only accepted module attribute is `type`",
|
||||
"The only accepted module attribute is `type`.",
|
||||
ModuleAttributeInvalidValue:
|
||||
"Only string literals are allowed as module attribute values",
|
||||
"Only string literals are allowed as module attribute values.",
|
||||
ModuleAttributesWithDuplicateKeys:
|
||||
'Duplicate key "%0" is not allowed in module attributes',
|
||||
'Duplicate key "%0" is not allowed in module attributes.',
|
||||
ModuleExportNameHasLoneSurrogate:
|
||||
"An export name cannot include a lone surrogate, found '\\u%0'",
|
||||
ModuleExportUndefined: "Export '%0' is not defined",
|
||||
MultipleDefaultsInSwitch: "Multiple default clauses",
|
||||
NewlineAfterThrow: "Illegal newline after throw",
|
||||
NoCatchOrFinally: "Missing catch or finally clause",
|
||||
NumberIdentifier: "Identifier directly after number",
|
||||
"An export name cannot include a lone surrogate, found '\\u%0'.",
|
||||
ModuleExportUndefined: "Export '%0' is not defined.",
|
||||
MultipleDefaultsInSwitch: "Multiple default clauses.",
|
||||
NewlineAfterThrow: "Illegal newline after throw.",
|
||||
NoCatchOrFinally: "Missing catch or finally clause.",
|
||||
NumberIdentifier: "Identifier directly after number.",
|
||||
NumericSeparatorInEscapeSequence:
|
||||
"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences",
|
||||
"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
|
||||
ObsoleteAwaitStar:
|
||||
"await* has been removed from the async functions proposal. Use Promise.all() instead.",
|
||||
"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
|
||||
OptionalChainingNoNew:
|
||||
"constructors in/after an Optional Chain are not allowed",
|
||||
"Constructors in/after an Optional Chain are not allowed.",
|
||||
OptionalChainingNoTemplate:
|
||||
"Tagged Template Literals are not allowed in optionalChain",
|
||||
"Tagged Template Literals are not allowed in optionalChain.",
|
||||
OverrideOnConstructor:
|
||||
"'override' modifier cannot appear on a constructor declaration.",
|
||||
ParamDupe: "Argument name clash",
|
||||
PatternHasAccessor: "Object pattern can't contain getter or setter",
|
||||
PatternHasMethod: "Object pattern can't contain methods",
|
||||
ParamDupe: "Argument name clash.",
|
||||
PatternHasAccessor: "Object pattern can't contain getter or setter.",
|
||||
PatternHasMethod: "Object pattern can't contain methods.",
|
||||
PipelineBodyNoArrow:
|
||||
'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized',
|
||||
'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
|
||||
PipelineBodySequenceExpression:
|
||||
"Pipeline body may not be a comma-separated sequence expression",
|
||||
"Pipeline body may not be a comma-separated sequence expression.",
|
||||
PipelineHeadSequenceExpression:
|
||||
"Pipeline head should not be a comma-separated sequence expression",
|
||||
"Pipeline head should not be a comma-separated sequence expression.",
|
||||
PipelineTopicUnused:
|
||||
"Pipeline is in topic style but does not use topic reference",
|
||||
"Pipeline is in topic style but does not use topic reference.",
|
||||
PrimaryTopicNotAllowed:
|
||||
"Topic reference was used in a lexical context without topic binding",
|
||||
"Topic reference was used in a lexical context without topic binding.",
|
||||
PrimaryTopicRequiresSmartPipeline:
|
||||
"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
|
||||
PrivateInExpectedIn:
|
||||
"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`)",
|
||||
PrivateNameRedeclaration: "Duplicate private name #%0",
|
||||
"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
|
||||
PrivateNameRedeclaration: "Duplicate private name #%0.",
|
||||
RecordExpressionBarIncorrectEndSyntaxType:
|
||||
"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",
|
||||
"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
|
||||
RecordExpressionBarIncorrectStartSyntaxType:
|
||||
"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",
|
||||
"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
|
||||
RecordExpressionHashIncorrectStartSyntaxType:
|
||||
"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'",
|
||||
RecordNoProto: "'__proto__' is not allowed in Record expressions",
|
||||
RestTrailingComma: "Unexpected trailing comma after rest element",
|
||||
"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
|
||||
RecordNoProto: "'__proto__' is not allowed in Record expressions.",
|
||||
RestTrailingComma: "Unexpected trailing comma after rest element.",
|
||||
SloppyFunction:
|
||||
"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",
|
||||
StaticPrototype: "Classes may not have static property named prototype",
|
||||
StrictDelete: "Deleting local variable in strict mode",
|
||||
StrictEvalArguments: "Assigning to '%0' in strict mode",
|
||||
StrictEvalArgumentsBinding: "Binding '%0' in strict mode",
|
||||
"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
|
||||
StaticPrototype: "Classes may not have static property named prototype.",
|
||||
StrictDelete: "Deleting local variable in strict mode.",
|
||||
StrictEvalArguments: "Assigning to '%0' in strict mode.",
|
||||
StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
|
||||
StrictFunction:
|
||||
"In strict mode code, functions can only be declared at top level or inside a block",
|
||||
"In strict mode code, functions can only be declared at top level or inside a block.",
|
||||
StrictNumericEscape:
|
||||
"The only valid numeric escape in strict mode is '\\0'",
|
||||
StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode",
|
||||
StrictWith: "'with' in strict mode",
|
||||
"The only valid numeric escape in strict mode is '\\0'.",
|
||||
StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
|
||||
StrictWith: "'with' in strict mode.",
|
||||
SuperNotAllowed:
|
||||
"super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
|
||||
SuperPrivateField: "Private fields can't be accessed on super",
|
||||
TrailingDecorator: "Decorators must be attached to a class element",
|
||||
"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
|
||||
SuperPrivateField: "Private fields can't be accessed on super.",
|
||||
TrailingDecorator: "Decorators must be attached to a class element.",
|
||||
TupleExpressionBarIncorrectEndSyntaxType:
|
||||
"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",
|
||||
"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
|
||||
TupleExpressionBarIncorrectStartSyntaxType:
|
||||
"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",
|
||||
"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
|
||||
TupleExpressionHashIncorrectStartSyntaxType:
|
||||
"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'",
|
||||
UnexpectedArgumentPlaceholder: "Unexpected argument placeholder",
|
||||
"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
|
||||
UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
|
||||
UnexpectedAwaitAfterPipelineBody:
|
||||
'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal',
|
||||
UnexpectedDigitAfterHash: "Unexpected digit after hash token",
|
||||
'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
|
||||
UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
|
||||
UnexpectedImportExport:
|
||||
"'import' and 'export' may only appear at the top level",
|
||||
UnexpectedKeyword: "Unexpected keyword '%0'",
|
||||
"'import' and 'export' may only appear at the top level.",
|
||||
UnexpectedKeyword: "Unexpected keyword '%0'.",
|
||||
UnexpectedLeadingDecorator:
|
||||
"Leading decorators must be attached to a class declaration",
|
||||
"Leading decorators must be attached to a class declaration.",
|
||||
UnexpectedLexicalDeclaration:
|
||||
"Lexical declaration cannot appear in a single-statement context",
|
||||
UnexpectedNewTarget: "new.target can only be used in functions",
|
||||
"Lexical declaration cannot appear in a single-statement context.",
|
||||
UnexpectedNewTarget: "`new.target` can only be used in functions.",
|
||||
UnexpectedNumericSeparator:
|
||||
"A numeric separator is only allowed between two digits",
|
||||
"A numeric separator is only allowed between two digits.",
|
||||
UnexpectedPrivateField:
|
||||
"Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
|
||||
UnexpectedReservedWord: "Unexpected reserved word '%0'",
|
||||
UnexpectedSuper: "super is only allowed in object methods and classes",
|
||||
UnexpectedToken: "Unexpected token '%0'",
|
||||
UnexpectedReservedWord: "Unexpected reserved word '%0'.",
|
||||
UnexpectedSuper: "'super' is only allowed in object methods and classes.",
|
||||
UnexpectedToken: "Unexpected token '%0'.",
|
||||
UnexpectedTokenUnaryExponentiation:
|
||||
"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
|
||||
UnsupportedBind: "Binding should be performed on object property.",
|
||||
UnsupportedDecoratorExport:
|
||||
"A decorated export must export a class declaration",
|
||||
"A decorated export must export a class declaration.",
|
||||
UnsupportedDefaultExport:
|
||||
"Only expressions, functions or classes are allowed as the `default` export.",
|
||||
UnsupportedImport: "import can only be used in import() or import.meta",
|
||||
UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1",
|
||||
UnsupportedImport:
|
||||
"`import` can only be used in `import()` or `import.meta`.",
|
||||
UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
|
||||
UnsupportedParameterDecorator:
|
||||
"Decorators cannot be used to decorate parameters",
|
||||
"Decorators cannot be used to decorate parameters.",
|
||||
UnsupportedPropertyDecorator:
|
||||
"Decorators cannot be used to decorate object literal properties",
|
||||
"Decorators cannot be used to decorate object literal properties.",
|
||||
UnsupportedSuper:
|
||||
"super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])",
|
||||
UnterminatedComment: "Unterminated comment",
|
||||
UnterminatedRegExp: "Unterminated regular expression",
|
||||
UnterminatedString: "Unterminated string constant",
|
||||
UnterminatedTemplate: "Unterminated template",
|
||||
VarRedeclaration: "Identifier '%0' has already been declared",
|
||||
"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
|
||||
UnterminatedComment: "Unterminated comment.",
|
||||
UnterminatedRegExp: "Unterminated regular expression.",
|
||||
UnterminatedString: "Unterminated string constant.",
|
||||
UnterminatedTemplate: "Unterminated template.",
|
||||
VarRedeclaration: "Identifier '%0' has already been declared.",
|
||||
YieldBindingIdentifier:
|
||||
"Can not use 'yield' as identifier inside a generator",
|
||||
YieldInParameter: "Yield expression is not allowed in formal parameters",
|
||||
"Can not use 'yield' as identifier inside a generator.",
|
||||
YieldInParameter: "Yield expression is not allowed in formal parameters.",
|
||||
ZeroDigitNumericSeparator:
|
||||
"Numeric separator can not be used after leading 0",
|
||||
"Numeric separator can not be used after leading 0.",
|
||||
},
|
||||
/* code */ ErrorCodes.SyntaxError,
|
||||
);
|
||||
|
||||
@ -53,14 +53,14 @@ const FlowErrors = makeErrorTemplates(
|
||||
AmbiguousConditionalArrow:
|
||||
"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
|
||||
AmbiguousDeclareModuleKind:
|
||||
"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module",
|
||||
AssignReservedType: "Cannot overwrite reserved type %0",
|
||||
"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
|
||||
AssignReservedType: "Cannot overwrite reserved type %0.",
|
||||
DeclareClassElement:
|
||||
"The `declare` modifier can only appear on class fields.",
|
||||
DeclareClassFieldInitializer:
|
||||
"Initializers are not allowed in fields with the `declare` modifier.",
|
||||
DuplicateDeclareModuleExports:
|
||||
"Duplicate `declare module.exports` statement",
|
||||
"Duplicate `declare module.exports` statement.",
|
||||
EnumBooleanMemberNotInitialized:
|
||||
"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
|
||||
EnumDuplicateMemberName:
|
||||
@ -85,23 +85,24 @@ const FlowErrors = makeErrorTemplates(
|
||||
"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
|
||||
GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
|
||||
ImportTypeShorthandOnlyInPureImport:
|
||||
"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements",
|
||||
"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
|
||||
InexactInsideExact:
|
||||
"Explicit inexact syntax cannot appear inside an explicit exact object type",
|
||||
"Explicit inexact syntax cannot appear inside an explicit exact object type.",
|
||||
InexactInsideNonObject:
|
||||
"Explicit inexact syntax cannot appear in class or interface definitions",
|
||||
InexactVariance: "Explicit inexact syntax cannot have variance",
|
||||
"Explicit inexact syntax cannot appear in class or interface definitions.",
|
||||
InexactVariance: "Explicit inexact syntax cannot have variance.",
|
||||
InvalidNonTypeImportInDeclareModule:
|
||||
"Imports within a `declare module` body must always be `import type` or `import typeof`",
|
||||
"Imports within a `declare module` body must always be `import type` or `import typeof`.",
|
||||
MissingTypeParamDefault:
|
||||
"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
|
||||
NestedDeclareModule:
|
||||
"`declare module` cannot be used inside another `declare module`",
|
||||
NestedFlowComment: "Cannot have a flow comment inside another flow comment",
|
||||
"`declare module` cannot be used inside another `declare module`.",
|
||||
NestedFlowComment:
|
||||
"Cannot have a flow comment inside another flow comment.",
|
||||
OptionalBindingPattern:
|
||||
"A binding pattern parameter cannot be optional in an implementation signature.",
|
||||
SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
|
||||
SpreadVariance: "Spread properties cannot have variance",
|
||||
SpreadVariance: "Spread properties cannot have variance.",
|
||||
ThisParamAnnotationRequired:
|
||||
"A type annotation is required for the `this` parameter.",
|
||||
ThisParamBannedInConstructor:
|
||||
@ -111,29 +112,29 @@ const FlowErrors = makeErrorTemplates(
|
||||
"The `this` parameter must be the first function parameter.",
|
||||
ThisParamNoDefault: "The `this` parameter may not have a default value.",
|
||||
TypeBeforeInitializer:
|
||||
"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`",
|
||||
"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
|
||||
TypeCastInPattern:
|
||||
"The type cast expression is expected to be wrapped with parenthesis",
|
||||
"The type cast expression is expected to be wrapped with parenthesis.",
|
||||
UnexpectedExplicitInexactInObject:
|
||||
"Explicit inexact syntax must appear at the end of an inexact object",
|
||||
UnexpectedReservedType: "Unexpected reserved type %0",
|
||||
"Explicit inexact syntax must appear at the end of an inexact object.",
|
||||
UnexpectedReservedType: "Unexpected reserved type %0.",
|
||||
UnexpectedReservedUnderscore:
|
||||
"`_` is only allowed as a type argument to call or new",
|
||||
"`_` is only allowed as a type argument to call or new.",
|
||||
UnexpectedSpaceBetweenModuloChecks:
|
||||
"Spaces between `%` and `checks` are not allowed here.",
|
||||
UnexpectedSpreadType:
|
||||
"Spread operator cannot appear in class or interface definitions",
|
||||
"Spread operator cannot appear in class or interface definitions.",
|
||||
UnexpectedSubtractionOperand:
|
||||
'Unexpected token, expected "number" or "bigint"',
|
||||
'Unexpected token, expected "number" or "bigint".',
|
||||
UnexpectedTokenAfterTypeParameter:
|
||||
"Expected an arrow function after this type parameter declaration",
|
||||
"Expected an arrow function after this type parameter declaration.",
|
||||
UnexpectedTypeParameterBeforeAsyncArrowFunction:
|
||||
"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`",
|
||||
"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
|
||||
UnsupportedDeclareExportKind:
|
||||
"`declare export %0` is not supported. Use `%1` instead",
|
||||
"`declare export %0` is not supported. Use `%1` instead.",
|
||||
UnsupportedStatementInDeclareModule:
|
||||
"Only declares and type imports are allowed inside declare module",
|
||||
UnterminatedFlowComment: "Unterminated flow-comment",
|
||||
"Only declares and type imports are allowed inside declare module.",
|
||||
UnterminatedFlowComment: "Unterminated flow-comment.",
|
||||
},
|
||||
/* code */ ErrorCodes.SyntaxError,
|
||||
);
|
||||
|
||||
@ -23,14 +23,15 @@ const DECIMAL_NUMBER = /^\d+$/;
|
||||
const JsxErrors = makeErrorTemplates(
|
||||
{
|
||||
AttributeIsEmpty:
|
||||
"JSX attributes must only be assigned a non-empty expression",
|
||||
MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>",
|
||||
MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>",
|
||||
"JSX attributes must only be assigned a non-empty expression.",
|
||||
MissingClosingTagElement:
|
||||
"Expected corresponding JSX closing tag for <%0>.",
|
||||
MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
|
||||
UnexpectedSequenceExpression:
|
||||
"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
|
||||
UnsupportedJsxValue:
|
||||
"JSX value should be either an expression or a quoted JSX text",
|
||||
UnterminatedJsxContent: "Unterminated JSX contents",
|
||||
"JSX value should be either an expression or a quoted JSX text.",
|
||||
UnterminatedJsxContent: "Unterminated JSX contents.",
|
||||
UnwrappedAdjacentJSXElements:
|
||||
"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?",
|
||||
},
|
||||
|
||||
@ -50,7 +50,7 @@ type MaybePlaceholder<T: PlaceholderTypes> = NodeOf<T>; // | Placeholder<T>
|
||||
|
||||
const PlaceHolderErrors = makeErrorTemplates(
|
||||
{
|
||||
ClassNameIsRequired: "A class name is required",
|
||||
ClassNameIsRequired: "A class name is required.",
|
||||
},
|
||||
/* code */ ErrorCodes.SyntaxError,
|
||||
);
|
||||
|
||||
@ -70,8 +70,9 @@ const TSErrors = makeErrorTemplates(
|
||||
{
|
||||
AbstractMethodHasImplementation:
|
||||
"Method '%0' cannot have an implementation because it is marked abstract.",
|
||||
ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier",
|
||||
ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier",
|
||||
ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
|
||||
ClassMethodHasReadonly:
|
||||
"Class methods cannot have the 'readonly' modifier.",
|
||||
ConstructorHasTypeParameters:
|
||||
"Type parameters cannot appear on a constructor declaration.",
|
||||
DeclareAccessor: "'declare' is not allowed in %0ters.",
|
||||
@ -80,24 +81,24 @@ const TSErrors = makeErrorTemplates(
|
||||
DeclareFunctionHasImplementation:
|
||||
"An implementation cannot be declared in ambient contexts.",
|
||||
DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
|
||||
DuplicateModifier: "Duplicate modifier: '%0'",
|
||||
DuplicateModifier: "Duplicate modifier: '%0'.",
|
||||
EmptyHeritageClauseType: "'%0' list cannot be empty.",
|
||||
EmptyTypeArguments: "Type argument list cannot be empty.",
|
||||
EmptyTypeParameters: "Type parameter list cannot be empty.",
|
||||
ExpectedAmbientAfterExportDeclare:
|
||||
"'export declare' must be followed by an ambient declaration.",
|
||||
ImportAliasHasImportType: "An import alias can not use 'import type'",
|
||||
ImportAliasHasImportType: "An import alias can not use 'import type'.",
|
||||
IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
|
||||
IndexSignatureHasAbstract:
|
||||
"Index signatures cannot have the 'abstract' modifier",
|
||||
"Index signatures cannot have the 'abstract' modifier.",
|
||||
IndexSignatureHasAccessibility:
|
||||
"Index signatures cannot have an accessibility modifier ('%0')",
|
||||
"Index signatures cannot have an accessibility modifier ('%0').",
|
||||
IndexSignatureHasDeclare:
|
||||
"Index signatures cannot have the 'declare' modifier",
|
||||
"Index signatures cannot have the 'declare' modifier.",
|
||||
IndexSignatureHasOverride:
|
||||
"'override' modifier cannot appear on an index signature.",
|
||||
IndexSignatureHasStatic:
|
||||
"Index signatures cannot have the 'static' modifier",
|
||||
"Index signatures cannot have the 'static' modifier.",
|
||||
InvalidModifierOnTypeMember:
|
||||
"'%0' modifier cannot appear on a type member.",
|
||||
InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
|
||||
@ -118,11 +119,11 @@ const TSErrors = makeErrorTemplates(
|
||||
PrivateElementHasAbstract:
|
||||
"Private elements cannot have the 'abstract' modifier.",
|
||||
PrivateElementHasAccessibility:
|
||||
"Private elements cannot have an accessibility modifier ('%0')",
|
||||
"Private elements cannot have an accessibility modifier ('%0').",
|
||||
ReadonlyForMethodSignature:
|
||||
"'readonly' modifier can only appear on a property declaration or index signature.",
|
||||
TypeAnnotationAfterAssign:
|
||||
"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`",
|
||||
"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
|
||||
TypeImportCannotSpecifyDefaultAndNamed:
|
||||
"A type-only import can specify a default import or named bindings, but not both.",
|
||||
UnexpectedParameterModifier:
|
||||
@ -133,11 +134,11 @@ const TSErrors = makeErrorTemplates(
|
||||
UnexpectedTypeCastInParameter:
|
||||
"Unexpected type cast in parameter position.",
|
||||
UnsupportedImportTypeArgument:
|
||||
"Argument in a type import must be a string literal",
|
||||
"Argument in a type import must be a string literal.",
|
||||
UnsupportedParameterPropertyKind:
|
||||
"A parameter property may not be declared using a binding pattern.",
|
||||
UnsupportedSignatureParameterKind:
|
||||
"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0",
|
||||
"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0.",
|
||||
},
|
||||
/* code */ ErrorCodes.SyntaxError,
|
||||
);
|
||||
|
||||
@ -1,66 +1,21 @@
|
||||
{
|
||||
"type": "FunctionExpression",
|
||||
"start": 0,
|
||||
"end": 40,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
|
||||
"id": null,
|
||||
"generator": false,
|
||||
"async": false,
|
||||
"params": [
|
||||
{
|
||||
"type": "AssignmentPattern",
|
||||
"start": 10,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"start":10,"end":23,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":23}},
|
||||
"left": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
"end": 11,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"start":10,"end":11,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":11},"identifierName":"a"},
|
||||
"name": "a"
|
||||
},
|
||||
"right": {
|
||||
"type": "StringLiteral",
|
||||
"start": 14,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"start":14,"end":23,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":23}},
|
||||
"extra": {
|
||||
"rawValue": "default",
|
||||
"raw": "\"default\""
|
||||
@ -71,58 +26,25 @@
|
||||
],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 25,
|
||||
"end": 40,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
"start":25,"end":40,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":40}},
|
||||
"body": [],
|
||||
"directives": [
|
||||
{
|
||||
"type": "Directive",
|
||||
"start": 26,
|
||||
"end": 39,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 26
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 39
|
||||
}
|
||||
},
|
||||
"start":26,"end":39,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":39}},
|
||||
"value": {
|
||||
"type": "DirectiveLiteral",
|
||||
"start": 26,
|
||||
"end": 38,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 26
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"value": "use strict",
|
||||
"start":26,"end":38,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":38}},
|
||||
"extra": {
|
||||
"raw": "\"use strict\"",
|
||||
"rawValue": "use strict"
|
||||
}
|
||||
},
|
||||
"value": "use strict"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": [
|
||||
"SyntaxError: Illegal 'use strict' directive in function with non-simple parameter list (1:0)"
|
||||
"SyntaxError: Illegal 'use strict' directive in function with non-simple parameter list. (1:0)"
|
||||
]
|
||||
}
|
||||
@ -1,20 +1,8 @@
|
||||
{
|
||||
"type": "Identifier",
|
||||
"start": 1,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 6
|
||||
},
|
||||
"identifierName": "public"
|
||||
},
|
||||
"start":1,"end":7,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":6},"identifierName":"public"},
|
||||
"name": "public",
|
||||
"errors": [
|
||||
"SyntaxError: Unexpected reserved word 'public' (2:0)"
|
||||
"SyntaxError: Unexpected reserved word 'public'. (2:0)"
|
||||
]
|
||||
}
|
||||
@ -2,8 +2,8 @@
|
||||
"type": "File",
|
||||
"start":0,"end":38,"loc":{"start":{"line":1,"column":0},"end":{"line":7,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Missing semicolon (2:11)",
|
||||
"SyntaxError: Missing semicolon (3:7)"
|
||||
"SyntaxError: Missing semicolon. (2:11)",
|
||||
"SyntaxError: Missing semicolon. (3:7)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":11,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":11}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:1)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:1)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -20,6 +20,10 @@
|
||||
"left": {
|
||||
"type": "AssignmentPattern",
|
||||
"start":1,"end":6,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":6}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 0
|
||||
},
|
||||
"left": {
|
||||
"type": "Identifier",
|
||||
"start":1,"end":2,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":2},"identifierName":"a"},
|
||||
@ -30,10 +34,6 @@
|
||||
"start":5,"end":6,"loc":{"start":{"line":1,"column":5},"end":{"line":1,"column":6}},
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 0
|
||||
}
|
||||
},
|
||||
"right": {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:2)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -24,6 +24,10 @@
|
||||
{
|
||||
"type": "AssignmentPattern",
|
||||
"start":2,"end":7,"loc":{"start":{"line":1,"column":2},"end":{"line":1,"column":7}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 1
|
||||
},
|
||||
"left": {
|
||||
"type": "Identifier",
|
||||
"start":2,"end":3,"loc":{"start":{"line":1,"column":2},"end":{"line":1,"column":3},"identifierName":"a"},
|
||||
@ -34,10 +38,6 @@
|
||||
"start":6,"end":7,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":7}},
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":21,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":21}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:2)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -24,6 +24,10 @@
|
||||
{
|
||||
"type": "ObjectPattern",
|
||||
"start":2,"end":15,"loc":{"start":{"line":1,"column":2},"end":{"line":1,"column":15}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 1
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"type": "Property",
|
||||
@ -59,11 +63,7 @@
|
||||
},
|
||||
"kind": "init"
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:7)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:7)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -43,6 +43,10 @@
|
||||
{
|
||||
"type": "ArrayPattern",
|
||||
"start":7,"end":14,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":14}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 6
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"type": "AssignmentPattern",
|
||||
@ -59,11 +63,7 @@
|
||||
"raw": "1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":12,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:2)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -24,17 +24,17 @@
|
||||
{
|
||||
"type": "ArrayPattern",
|
||||
"start":2,"end":5,"loc":{"start":{"line":1,"column":2},"end":{"line":1,"column":5}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 1
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
"start":3,"end":4,"loc":{"start":{"line":1,"column":3},"end":{"line":1,"column":4},"identifierName":"x"},
|
||||
"name": "x"
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},
|
||||
"errors": [
|
||||
"SyntaxError: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement (1:10)"
|
||||
"SyntaxError: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:10)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":36,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":36}},
|
||||
"errors": [
|
||||
"SyntaxError: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement (1:20)"
|
||||
"SyntaxError: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:20)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:6)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":21,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":21}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:1)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:1)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:1)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:1)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":11,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":11}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:0)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":10,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":10}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:0)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":15,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":15}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:0)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -27,6 +27,9 @@
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
"start":2,"end":3,"loc":{"start":{"line":1,"column":2},"end":{"line":1,"column":3}},
|
||||
"extra": {
|
||||
"shorthand": true
|
||||
},
|
||||
"method": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@ -39,9 +42,6 @@
|
||||
"type": "Identifier",
|
||||
"start":2,"end":3,"loc":{"start":{"line":1,"column":2},"end":{"line":1,"column":3},"identifierName":"x"},
|
||||
"name": "x"
|
||||
},
|
||||
"extra": {
|
||||
"shorthand": true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid left-hand side in parenthesized expression (1:1)"
|
||||
"SyntaxError: Invalid left-hand side in parenthesized expression. (1:1)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":16,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":16}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:5)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:5)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":12,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:1)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:1)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":2}},
|
||||
"errors": [
|
||||
"SyntaxError: Unexpected keyword 'break' (2:2)"
|
||||
"SyntaxError: Unexpected keyword 'break'. (2:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -29,6 +29,9 @@
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
"start":12,"end":22,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":12}},
|
||||
"extra": {
|
||||
"shorthand": true
|
||||
},
|
||||
"method": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@ -41,9 +44,6 @@
|
||||
"type": "Identifier",
|
||||
"start":12,"end":22,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":12},"identifierName":"break"},
|
||||
"name": "break"
|
||||
},
|
||||
"extra": {
|
||||
"shorthand": true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,12 +2,12 @@
|
||||
"type": "File",
|
||||
"start":0,"end":182,"loc":{"start":{"line":1,"column":0},"end":{"line":21,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (2:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (7:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (8:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (14:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (19:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (20:4)"
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (2:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (7:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (8:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (14:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (19:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (20:4)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,16 +2,16 @@
|
||||
"type": "File",
|
||||
"start":0,"end":87,"loc":{"start":{"line":1,"column":0},"end":{"line":11,"column":22}},
|
||||
"errors": [
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (1:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (1:10)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (1:18)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (3:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (4:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (8:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (9:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (11:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (11:10)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (11:18)"
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (1:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (1:10)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (1:18)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (3:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (4:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (8:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (9:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (11:2)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (11:10)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (11:18)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
"type": "File",
|
||||
"start":0,"end":51,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (2:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (2:9)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (4:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (4:9)"
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (2:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (2:9)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (4:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (4:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"type": "File",
|
||||
"start":0,"end":49,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (4:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (4:9)"
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (4:4)",
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (4:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":76,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":76}},
|
||||
"errors": [
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (1:69)"
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (1:69)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -47,11 +47,11 @@
|
||||
"value": {
|
||||
"type": "DirectiveLiteral",
|
||||
"start":52,"end":71,"loc":{"start":{"line":1,"column":52},"end":{"line":1,"column":71}},
|
||||
"value": "octal directive\\1",
|
||||
"extra": {
|
||||
"raw": "\"octal directive\\1\"",
|
||||
"rawValue": "octal directive\\1"
|
||||
}
|
||||
},
|
||||
"value": "octal directive\\1"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -65,11 +65,11 @@
|
||||
"value": {
|
||||
"type": "DirectiveLiteral",
|
||||
"start":19,"end":31,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":31}},
|
||||
"value": "use strict",
|
||||
"extra": {
|
||||
"raw": "\"use strict\"",
|
||||
"rawValue": "use strict"
|
||||
}
|
||||
},
|
||||
"value": "use strict"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":50,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":50}},
|
||||
"errors": [
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0' (1:38)"
|
||||
"SyntaxError: The only valid numeric escape in strict mode is '\\0'. (1:38)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -31,6 +31,10 @@
|
||||
"expression": {
|
||||
"type": "ObjectExpression",
|
||||
"start":34,"end":46,"loc":{"start":{"line":1,"column":34},"end":{"line":1,"column":46}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 33
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -57,11 +61,7 @@
|
||||
"value": 42
|
||||
}
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 33
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -72,11 +72,11 @@
|
||||
"value": {
|
||||
"type": "DirectiveLiteral",
|
||||
"start":19,"end":31,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":31}},
|
||||
"value": "use strict",
|
||||
"extra": {
|
||||
"raw": "'use strict'",
|
||||
"rawValue": "use strict"
|
||||
}
|
||||
},
|
||||
"value": "use strict"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid escape sequence in template (1:2)"
|
||||
"SyntaxError: Invalid escape sequence in template. (1:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid escape sequence in template (1:2)"
|
||||
"SyntaxError: Invalid escape sequence in template. (1:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
"type": "File",
|
||||
"start":0,"end":84,"loc":{"start":{"line":1,"column":0},"end":{"line":10,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode (3:2)",
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode (8:2)",
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode (9:2)"
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode. (3:2)",
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode. (8:2)",
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode. (9:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"type": "File",
|
||||
"start":0,"end":21,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":21}},
|
||||
"errors": [
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode (1:14)",
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode (1:18)"
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode. (1:14)",
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode. (1:18)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":15,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":15}},
|
||||
"errors": [
|
||||
"SyntaxError: setter must have exactly one formal parameter (1:3)"
|
||||
"SyntaxError: A 'set' accesor must have exactly one formal parameter. (1:3)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -16,6 +16,10 @@
|
||||
"expression": {
|
||||
"type": "ObjectExpression",
|
||||
"start":1,"end":14,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":14}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 0
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"type": "ObjectMethod",
|
||||
@ -39,11 +43,7 @@
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":4,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":4}},
|
||||
"errors": [
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode (1:0)"
|
||||
"SyntaxError: Legacy octal literals are not allowed in strict mode. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":4,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":4}},
|
||||
"errors": [
|
||||
"SyntaxError: Missing semicolon (1:2)"
|
||||
"SyntaxError: Missing semicolon. (1:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":44,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (4:6)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (4:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":34,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":12}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (3:4)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (3:4)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":44,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (4:6)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (4:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":34,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":12}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (3:4)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (3:4)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":30,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (2:15)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (2:15)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":39,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":39}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (1:35)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (1:35)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":43,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (3:11)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (3:11)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":34,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (3:6)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (3:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":47,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (2:28)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (2:28)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":36,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (3:6)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (3:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":38,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (3:6)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (3:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -29,6 +29,9 @@
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
"start":17,"end":20,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":14}},
|
||||
"extra": {
|
||||
"shorthand": true
|
||||
},
|
||||
"method": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@ -41,9 +44,6 @@
|
||||
"type": "Identifier",
|
||||
"start":17,"end":20,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":14},"identifierName":"foo"},
|
||||
"name": "foo"
|
||||
},
|
||||
"extra": {
|
||||
"shorthand": true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":27,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":13}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (2:6)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (2:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":28,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":14}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (2:6)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (2:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":33,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":19}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (2:9)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (2:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":12}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (2:4)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (2:4)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":8}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (2:4)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (2:4)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (1:13)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (1:13)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":36,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":36}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'f' has already been declared (1:28)"
|
||||
"SyntaxError: Identifier 'f' has already been declared. (1:28)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":39,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":39}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (1:29)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (1:29)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":35,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":17}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (2:9)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (2:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":38,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (3:6)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (3:6)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":36,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":36}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'f' has already been declared (1:28)"
|
||||
"SyntaxError: Identifier 'f' has already been declared. (1:28)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'foo' has already been declared (1:9)"
|
||||
"SyntaxError: Identifier 'foo' has already been declared. (1:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'a' has already been declared (3:8)"
|
||||
"SyntaxError: Identifier 'a' has already been declared. (3:8)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"errors": [
|
||||
"SyntaxError: Identifier 'i' has already been declared (2:8)"
|
||||
"SyntaxError: Identifier 'i' has already been declared. (2:8)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":30,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},
|
||||
"errors": [
|
||||
"SyntaxError: Export 'encrypt' is not defined (1:9)"
|
||||
"SyntaxError: Export 'encrypt' is not defined. (1:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":52,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":21}},
|
||||
"errors": [
|
||||
"SyntaxError: Export 'encrypt' is not defined (1:9)"
|
||||
"SyntaxError: Export 'encrypt' is not defined. (1:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":46,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":18}},
|
||||
"errors": [
|
||||
"SyntaxError: Export 'encrypt' is not defined (4:9)"
|
||||
"SyntaxError: Export 'encrypt' is not defined. (4:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},
|
||||
"errors": [
|
||||
"SyntaxError: Export 'Object' is not defined (1:9)"
|
||||
"SyntaxError: Export 'Object' is not defined. (1:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}},
|
||||
"errors": [
|
||||
"SyntaxError: Export 'Object' is not defined (1:9)"
|
||||
"SyntaxError: Export 'Object' is not defined. (1:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"type": "File",
|
||||
"start":0,"end":51,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":31}},
|
||||
"errors": [
|
||||
"SyntaxError: In strict mode code, functions can only be declared at top level or inside a block (2:10)",
|
||||
"SyntaxError: Export 'encrypt' is not defined (1:9)"
|
||||
"SyntaxError: In strict mode code, functions can only be declared at top level or inside a block. (2:10)",
|
||||
"SyntaxError: Export 'encrypt' is not defined. (1:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
|
||||
"errors": [
|
||||
"SyntaxError: Export 'encrypt' is not defined (1:9)"
|
||||
"SyntaxError: Export 'encrypt' is not defined. (1:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
"type": "File",
|
||||
"start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid regular expression flag (1:17)",
|
||||
"SyntaxError: Invalid regular expression flag (1:19)",
|
||||
"SyntaxError: Invalid regular expression flag (1:20)",
|
||||
"SyntaxError: Invalid regular expression flag (1:21)",
|
||||
"SyntaxError: Invalid regular expression flag (1:22)"
|
||||
"SyntaxError: Invalid regular expression flag. (1:17)",
|
||||
"SyntaxError: Invalid regular expression flag. (1:19)",
|
||||
"SyntaxError: Invalid regular expression flag. (1:20)",
|
||||
"SyntaxError: Invalid regular expression flag. (1:21)",
|
||||
"SyntaxError: Invalid regular expression flag. (1:22)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Identifier directly after number (1:2)"
|
||||
"throws": "Identifier directly after number. (1:2)"
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Identifier directly after number (1:1)"
|
||||
"throws": "Identifier directly after number. (1:1)"
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":2,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":2}},
|
||||
"errors": [
|
||||
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
|
||||
"SyntaxError: Floating-point numbers require a valid exponent after the 'e'. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3}},
|
||||
"errors": [
|
||||
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
|
||||
"SyntaxError: Floating-point numbers require a valid exponent after the 'e'. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3}},
|
||||
"errors": [
|
||||
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
|
||||
"SyntaxError: Floating-point numbers require a valid exponent after the 'e'. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Identifier directly after number (1:1)"
|
||||
"throws": "Identifier directly after number. (1:1)"
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Identifier directly after number (1:1)"
|
||||
"throws": "Identifier directly after number. (1:1)"
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":2,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":2}},
|
||||
"errors": [
|
||||
"SyntaxError: Expected number in radix 16 (1:2)"
|
||||
"SyntaxError: Expected number in radix 16. (1:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Identifier directly after number (1:2)"
|
||||
"throws": "Identifier directly after number. (1:2)"
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Identifier directly after number (1:1)"
|
||||
"throws": "Identifier directly after number. (1:1)"
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Identifier directly after number (1:3)"
|
||||
"throws": "Identifier directly after number. (1:3)"
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unterminated string constant (1:0)"
|
||||
"throws": "Unterminated string constant. (1:0)"
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":2,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":2}},
|
||||
"errors": [
|
||||
"SyntaxError: Expecting Unicode escape sequence \\uXXXX (1:2)"
|
||||
"SyntaxError: Expecting Unicode escape sequence \\uXXXX. (1:2)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":7,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":7}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid Unicode escape (1:1)"
|
||||
"SyntaxError: Invalid Unicode escape. (1:1)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":7,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":7}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid Unicode escape (1:1)"
|
||||
"SyntaxError: Invalid Unicode escape. (1:1)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unterminated regular expression (1:1)"
|
||||
"throws": "Unterminated regular expression. (1:1)"
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unterminated regular expression (1:1)"
|
||||
"throws": "Unterminated regular expression. (1:1)"
|
||||
}
|
||||
@ -2,8 +2,8 @@
|
||||
"type": "File",
|
||||
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid regular expression flag (1:16)",
|
||||
"SyntaxError: Invalid regular expression flag (1:18)"
|
||||
"SyntaxError: Invalid regular expression flag. (1:16)",
|
||||
"SyntaxError: Invalid regular expression flag. (1:18)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid left-hand side in assignment expression (1:0)"
|
||||
"SyntaxError: Invalid left-hand side in assignment expression. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"type": "File",
|
||||
"start":0,"end":10,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":10}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid left-hand side in assignment expression (1:0)"
|
||||
"SyntaxError: Invalid left-hand side in assignment expression. (1:0)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"type": "File",
|
||||
"start":0,"end":12,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},
|
||||
"errors": [
|
||||
"SyntaxError: Invalid parenthesized assignment pattern (1:1)",
|
||||
"SyntaxError: Invalid left-hand side in assignment expression (1:1)"
|
||||
"SyntaxError: Invalid parenthesized assignment pattern. (1:1)",
|
||||
"SyntaxError: Invalid left-hand side in assignment expression. (1:1)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
@ -21,6 +21,10 @@
|
||||
"left": {
|
||||
"type": "BinaryExpression",
|
||||
"start":1,"end":6,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":6}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 0
|
||||
},
|
||||
"left": {
|
||||
"type": "NumericLiteral",
|
||||
"start":1,"end":2,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":2}},
|
||||
@ -39,10 +43,6 @@
|
||||
"raw": "1"
|
||||
},
|
||||
"value": 1
|
||||
},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 0
|
||||
}
|
||||
},
|
||||
"right": {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user