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