mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
1400a0f8be
Named exports must have a string literal module source once `from` is present. The parser previously combined consuming `from` with checking whether the next token was a literal:
```rust
if self.eat(Kind::From) && self.cur_kind().is_literal()
```
When the next token was not a literal, `from` had already been consumed, but parsing fell back to a local export. This incorrectly accepted `export {} from;`, `export {} from` at EOF, and this input:
```js
export {} from
foo();
```
In the last case, the newline allowed automatic semicolon insertion, so the parser accepted a local empty export followed by `foo()` despite the incomplete `from` clause.
Remove the literal-kind guard so consuming `from` always leads to `parse_literal_string()`. That helper already requires a string literal and handles malformed input through the existing parser diagnostics. A missing source now produces a syntax error instead of becoming a local export, while unterminated strings and comments retain the standard lexer diagnostics.
Valid local exports such as `export { foo };` and re-exports such as `export { foo } from "./module.js";` keep their existing behavior, including a module source placed on the next line.
15773 lines
611 KiB
Plaintext
15773 lines
611 KiB
Plaintext
commit: 1eac4481
|
||
|
||
parser_babel Summary:
|
||
AST Parsed : 2234/2234 (100.00%)
|
||
Positive Passed: 2218/2234 (99.28%)
|
||
Negative Passed: 1728/1742 (99.20%)
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/cast/unparenthesized-assert-and-assign/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/cast/unparenthesized-type-assertion-and-assign/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/conditional/arrow-ambiguity/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/conditional/arrow-like/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/conditional/arrow-param/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/export/equals-in-script/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/export/invalid-as-namespace-duplicate-identifier/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/import/equals-in-script/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/import/equals-require-in-script/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-export-named/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-declare-module-identifier/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-global-redeclare-block-level-variable-in-module/input.ts
|
||
|
||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/module-identifier-invalid/input.ts
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/estree/class-private-method/typescript-invalid-abstract/input.ts
|
||
|
||
× TS(18019): 'abstract' modifier cannot be used with a private identifier.
|
||
╭─[babel/packages/babel-parser/test/fixtures/estree/class-private-method/typescript-invalid-abstract/input.ts:2:12]
|
||
1 │ abstract class TSAbstractClass {
|
||
2 │ abstract #foo(name: string): boolean;
|
||
· ────
|
||
3 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-modifier-names/input.ts
|
||
|
||
× Multiple constructor implementations are not allowed.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-modifier-names/input.ts:2:3]
|
||
1 │ class Foo {
|
||
2 │ constructor(set, readonly) {}
|
||
· ─────┬─────
|
||
· ╰── constructor has already been declared here
|
||
3 │ constructor(set: any, readonly: boolean) {}
|
||
· ─────┬─────
|
||
· ╰── it cannot be redeclared here
|
||
4 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/declare/input.ts
|
||
|
||
× Identifier `x` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare/input.ts:3:5]
|
||
2 │ [x: string]: any;
|
||
3 │ x;
|
||
· ┬
|
||
· ╰── `x` has already been declared here
|
||
4 │ x: number;
|
||
· ┬
|
||
· ╰── It can not be redeclared here
|
||
5 │ f();
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts
|
||
|
||
× TS(2391): Function implementation is missing or not immediately following the declaration.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:2:5]
|
||
1 │ class C {
|
||
2 │ public(): void;
|
||
· ──────
|
||
3 │ public static(): void;
|
||
╰────
|
||
|
||
× TS(2391): Function implementation is missing or not immediately following the declaration.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:3:12]
|
||
2 │ public(): void;
|
||
3 │ public static(): void;
|
||
· ──────
|
||
4 │ readonly = 0;
|
||
╰────
|
||
|
||
× TS(2391): Function implementation is missing or not immediately following the declaration.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:5:5]
|
||
4 │ readonly = 0;
|
||
5 │ async<T>(): void;
|
||
· ─────
|
||
6 │ abstract!:void;
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-reserved-names/input.ts
|
||
|
||
× TS(2391): Function implementation is missing or not immediately following the declaration.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-reserved-names/input.ts:2:12]
|
||
1 │ class C {
|
||
2 │ public delete(): void;
|
||
· ──────
|
||
3 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-no-body/input.ts
|
||
|
||
× TS(2391): Function implementation is missing or not immediately following the declaration.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-no-body/input.ts:3:5]
|
||
2 │ f();
|
||
3 │ f(): void;
|
||
· ─
|
||
4 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts
|
||
|
||
× TS(2391): Function implementation is missing or not immediately following the declaration.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts:3:5]
|
||
2 │ {
|
||
3 │ m()
|
||
· ─
|
||
4 │ n()
|
||
╰────
|
||
|
||
× TS(2391): Function implementation is missing or not immediately following the declaration.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts:4:5]
|
||
3 │ m()
|
||
4 │ n()
|
||
· ─
|
||
5 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-override/input.ts
|
||
|
||
× Identifier `show` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-override/input.ts:2:12]
|
||
1 │ class MyClass extends BaseClass {
|
||
2 │ override show() {}
|
||
· ──┬─
|
||
· ╰── `show` has already been declared here
|
||
3 │ public override show() {}
|
||
· ──┬─
|
||
· ╰── It can not be redeclared here
|
||
4 │ override size = 5;
|
||
╰────
|
||
|
||
× Identifier `size` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-override/input.ts:4:12]
|
||
3 │ public override show() {}
|
||
4 │ override size = 5;
|
||
· ──┬─
|
||
· ╰── `size` has already been declared here
|
||
5 │ override readonly size = 5;
|
||
· ──┬─
|
||
· ╰── It can not be redeclared here
|
||
6 │
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/input.ts
|
||
|
||
× TS(1016): A required parameter cannot follow an optional parameter.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/input.ts:7:9]
|
||
6 │ private pi?: number,
|
||
7 │ public readonly pur,
|
||
· ───────────────────
|
||
8 │ // Also works on AssignmentPattern
|
||
╰────
|
||
|
||
× TS(1015): A parameter cannot have a question mark and an initializer.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/input.ts:10:16]
|
||
9 │ readonly x = 0,
|
||
10 │ public y?: number = 0) {}
|
||
· ─
|
||
11 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts
|
||
|
||
× Identifier `x` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts:2:5]
|
||
1 │ class C {
|
||
2 │ x;
|
||
· ┬
|
||
· ╰── `x` has already been declared here
|
||
3 │ x?;
|
||
· ┬
|
||
· ╰── It can not be redeclared here
|
||
4 │ x: number;
|
||
╰────
|
||
|
||
× Identifier `x` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts:3:5]
|
||
2 │ x;
|
||
3 │ x?;
|
||
· ┬
|
||
· ╰── `x` has already been declared here
|
||
4 │ x: number;
|
||
· ┬
|
||
· ╰── It can not be redeclared here
|
||
5 │ x: number = 1;
|
||
╰────
|
||
|
||
× Identifier `x` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts:4:5]
|
||
3 │ x?;
|
||
4 │ x: number;
|
||
· ┬
|
||
· ╰── `x` has already been declared here
|
||
5 │ x: number = 1;
|
||
· ┬
|
||
· ╰── It can not be redeclared here
|
||
6 │ x!: number;
|
||
╰────
|
||
|
||
× Identifier `x` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts:5:5]
|
||
4 │ x: number;
|
||
5 │ x: number = 1;
|
||
· ┬
|
||
· ╰── `x` has already been declared here
|
||
6 │ x!: number;
|
||
· ┬
|
||
· ╰── It can not be redeclared here
|
||
7 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/static/input.ts
|
||
|
||
× TS(2391): Function implementation is missing or not immediately following the declaration.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/static/input.ts:5:20]
|
||
4 │ protected static f();
|
||
5 │ private static f();
|
||
· ─
|
||
6 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/function/declare-pattern-parameters/input.ts
|
||
|
||
× TS(1016): A required parameter cannot follow an optional parameter.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/declare-pattern-parameters/input.ts:1:25]
|
||
1 │ declare function f([]?, {})
|
||
· ──
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/head/input.ts
|
||
|
||
× TS(1035): Only ambient modules can use quoted names.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/head/input.ts:3:8]
|
||
2 │ namespace M.N.O {}
|
||
3 │ module "m" {}
|
||
· ───
|
||
4 │ module 'n' {}
|
||
╰────
|
||
|
||
× TS(1035): Only ambient modules can use quoted names.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/head/input.ts:4:8]
|
||
3 │ module "m" {}
|
||
4 │ module 'n' {}
|
||
· ───
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-in-nested-module/input.ts
|
||
|
||
× TS(2435): Ambient modules cannot be nested in other modules or namespaces.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-in-nested-module/input.ts:3:3]
|
||
2 │ import type { JSONSchema7 } from 'json-schema';
|
||
3 │ ╭─▶ module 'test/sub2' {
|
||
4 │ │ export { JSONSchema7 }
|
||
5 │ ╰─▶ }
|
||
6 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts
|
||
|
||
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:22:13]
|
||
21 │
|
||
22 │ interface I<const T> {}
|
||
· ───────
|
||
23 │ interface J<const T extends U> {}
|
||
╰────
|
||
|
||
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:23:13]
|
||
22 │ interface I<const T> {}
|
||
23 │ interface J<const T extends U> {}
|
||
· ─────────────────
|
||
24 │ interface K<T, const U> {}
|
||
╰────
|
||
|
||
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:24:16]
|
||
23 │ interface J<const T extends U> {}
|
||
24 │ interface K<T, const U> {}
|
||
· ───────
|
||
25 │ interface L<in const T> {}
|
||
╰────
|
||
|
||
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:25:13]
|
||
24 │ interface K<T, const U> {}
|
||
25 │ interface L<in const T> {}
|
||
· ──────────
|
||
26 │ interface M<const in T> {}
|
||
╰────
|
||
|
||
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:26:13]
|
||
25 │ interface L<in const T> {}
|
||
26 │ interface M<const in T> {}
|
||
· ──────────
|
||
27 │
|
||
╰────
|
||
|
||
× Identifier `method` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:29:3]
|
||
28 │ class _ {
|
||
29 │ method<const T>() {}
|
||
· ───┬──
|
||
· ╰── `method` has already been declared here
|
||
30 │ method<const T extends U>() {}
|
||
· ───┬──
|
||
· ╰── It can not be redeclared here
|
||
31 │ method<T, const U>() {}
|
||
╰────
|
||
|
||
× Identifier `method` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:30:3]
|
||
29 │ method<const T>() {}
|
||
30 │ method<const T extends U>() {}
|
||
· ───┬──
|
||
· ╰── `method` has already been declared here
|
||
31 │ method<T, const U>() {}
|
||
· ───┬──
|
||
· ╰── It can not be redeclared here
|
||
32 │ }
|
||
╰────
|
||
|
||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/types/literal-string-4/input.ts
|
||
|
||
× TS(1338): 'infer' declarations are only permitted in the 'extends' clause of a conditional type.
|
||
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/literal-string-4/input.ts:1:15]
|
||
1 │ let x: `foo-${infer bar}`;
|
||
· ─────────
|
||
╰────
|
||
|
||
|
||
× Invalid function declaration
|
||
╭─[babel/packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-if-body/input.js:1:11]
|
||
1 │ if (0) x: function f() {}
|
||
· ───────────────
|
||
╰────
|
||
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
|
||
|
||
× Identifier `f` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/annex-b/enabled/3.4-var-redeclaration-catch-binding/input.js:2:17]
|
||
1 │ try {} catch (e) { var e; }
|
||
2 │ try {} catch ({ f }) { var f; }
|
||
· ┬ ┬
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `f` has already been declared here
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/annex-b/enabled/invalid-assignment-target-type/input.js:3:2]
|
||
2 │
|
||
3 │ [async()] = [];
|
||
· ───────
|
||
4 │ ({ a: async() } = {});
|
||
╰────
|
||
|
||
× Expected `;` but found `Identifier`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/for-missing-semicolons/input.js:3:3]
|
||
2 │ var a = 1
|
||
3 │ a < 3
|
||
· ┬
|
||
· ╰── `;` expected
|
||
4 │ a++
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-1/input.js:1:2]
|
||
1 │ (a = 1) = t
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-2/input.js:1:3]
|
||
1 │ [(a = 1)] = t
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-3/input.js:1:2]
|
||
1 │ [({ a: [b = 2]})] = t
|
||
· ───────────────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-4/input.js:1:7]
|
||
1 │ [{b: [([a = 1])]}] = t
|
||
· ─────────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-5/input.js:1:2]
|
||
1 │ [([x])] = t;
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-6/input.js:1:2]
|
||
1 │ (a += 1) = t
|
||
· ──────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-7/input.js:1:2]
|
||
1 │ (a -= 1) = t
|
||
· ──────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-8/input.js:1:2]
|
||
1 │ (b = (a -= 1)) = t
|
||
· ────────────
|
||
╰────
|
||
|
||
× Invalid function declaration
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/input.js:1:11]
|
||
1 │ while (1) function foo(){}
|
||
· ────────────────
|
||
╰────
|
||
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
|
||
|
||
× Invalid function declaration
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-if/input.js:1:18]
|
||
1 │ if (1) foo: bar: function foo(){}
|
||
· ────────────────
|
||
╰────
|
||
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
|
||
|
||
× Invalid function declaration
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/input.js:1:21]
|
||
1 │ while (1) foo: bar: function foo(){}
|
||
· ────────────────
|
||
╰────
|
||
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-left-hand-side-in-postfix-operation/input.js:1:1]
|
||
1 │ a++ = t
|
||
· ───
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-left-hand-side-in-prefix-operation/input.js:1:1]
|
||
1 │ ++a = t
|
||
· ───
|
||
╰────
|
||
|
||
× Expected switch clause
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/malformed-switch/input.js:2:3]
|
||
1 │ switch (x) {
|
||
2 │ var y = 5;
|
||
· ─┬─
|
||
· ╰── `case` or `default` clause expected here
|
||
3 │ }
|
||
╰────
|
||
help: If this is intended to be the condition for the switch statement, add `case` before it.
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern/input.js:1:1]
|
||
1 │ ({x}) = {x: 1};
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-2/input.js:1:7]
|
||
1 │ [{b: [([a = 1])]}] = t
|
||
· ─────────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-3/input.js:1:2]
|
||
1 │ [({ a: [b = 2]})] = t
|
||
· ───────────────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-4/input.js:1:3]
|
||
1 │ [(a = 1)] = t
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-5/input.js:1:2]
|
||
1 │ (a = 1) = t
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-6/input.js:1:1]
|
||
1 │ ([a]) = []
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-left-hand-side/input.js:1:2]
|
||
1 │ (!a) += 1
|
||
· ──
|
||
╰────
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-pattern-in-rest-binding/input.js:1:11]
|
||
1 │ ([...(a)]) => {}
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/valid-parenthesized-assignment-array-pattern-3/input.js:1:2]
|
||
1 │ [([x])] = t;
|
||
· ─────
|
||
╰────
|
||
|
||
× Expected `:` but found `}`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-keyword/invalid/input.js:3:1]
|
||
2 │ br\u{65}ak
|
||
3 │ };
|
||
· ┬
|
||
· ╰── `:` expected
|
||
╰────
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:1:1]
|
||
1 │ "\01 foo \02 bar \03";
|
||
· ─────────────────────
|
||
2 │
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:3:1]
|
||
2 │
|
||
3 │ "\4";
|
||
· ────
|
||
4 │ "\5";
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:4:1]
|
||
3 │ "\4";
|
||
4 │ "\5";
|
||
· ────
|
||
5 │
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:8:1]
|
||
7 │
|
||
8 │ "\4";
|
||
· ────
|
||
9 │ "\5";
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:9:1]
|
||
8 │ "\4";
|
||
9 │ "\5";
|
||
· ────
|
||
10 │
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:11:1]
|
||
10 │
|
||
11 │ "\04 foo \05 bar \06";
|
||
· ─────────────────────
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:2:3]
|
||
1 │ function a() {
|
||
2 │ "\5";
|
||
· ────
|
||
3 │ "use strict";
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:7:3]
|
||
6 │ function b() {
|
||
7 │ "\4";
|
||
· ────
|
||
8 │ "\5";
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:8:3]
|
||
7 │ "\4";
|
||
8 │ "\5";
|
||
· ────
|
||
9 │ "use strict";
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:14:3]
|
||
13 │ "use strict";
|
||
14 │ "\5";
|
||
· ────
|
||
15 │ }
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:19:3]
|
||
18 │ "use strict";
|
||
19 │ "\4";
|
||
· ────
|
||
20 │ "\5";
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:20:3]
|
||
19 │ "\4";
|
||
20 │ "\5";
|
||
· ────
|
||
21 │ }
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× Invalid escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine/input.js:4:3]
|
||
3 │ "use strict";
|
||
4 │ "\8";"\9";
|
||
· ────
|
||
5 │ }
|
||
╰────
|
||
help: \8 and \9 are not allowed in strict mode
|
||
|
||
× Invalid escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine/input.js:4:8]
|
||
3 │ "use strict";
|
||
4 │ "\8";"\9";
|
||
· ────
|
||
5 │ }
|
||
╰────
|
||
help: \8 and \9 are not allowed in strict mode
|
||
|
||
× Invalid escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine-before-use-strict/input.js:2:3]
|
||
1 │ () => {
|
||
2 │ "\8";"\9";
|
||
· ────
|
||
3 │ "use strict";
|
||
╰────
|
||
help: \8 and \9 are not allowed in strict mode
|
||
|
||
× Invalid escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine-before-use-strict/input.js:2:8]
|
||
1 │ () => {
|
||
2 │ "\8";"\9";
|
||
· ────
|
||
3 │ "use strict";
|
||
╰────
|
||
help: \8 and \9 are not allowed in strict mode
|
||
|
||
× Invalid escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine-before-use-strict/input.js:4:3]
|
||
3 │ "use strict";
|
||
4 │ "\8";"\9";
|
||
· ────
|
||
5 │ }
|
||
╰────
|
||
help: \8 and \9 are not allowed in strict mode
|
||
|
||
× Invalid escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine-before-use-strict/input.js:4:8]
|
||
3 │ "use strict";
|
||
4 │ "\8";"\9";
|
||
· ────
|
||
5 │ }
|
||
╰────
|
||
help: \8 and \9 are not allowed in strict mode
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/numeric-escape-in-directive/input.js:1:53]
|
||
1 │ function hello() { "use strict"; function inner() { "octal directive\1"; } }
|
||
· ───────────────────
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/numeric-escape-in-property-name/input.js:1:37]
|
||
1 │ function hello() { 'use strict'; ({ "\1": 42 }); }
|
||
· ────
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× Bad escape sequence in untagged template literal
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-template/non-octal-eight/input.js:1:2]
|
||
1 │ `\8`;
|
||
· ──
|
||
╰────
|
||
|
||
× Bad escape sequence in untagged template literal
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/escape-template/non-octal-nine/input.js:1:2]
|
||
1 │ `\9`;
|
||
· ──
|
||
╰────
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict/input.js:1:15]
|
||
1 │ "use strict"; 04; 05;
|
||
· ──
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict/input.js:1:19]
|
||
1 │ "use strict"; 04; 05;
|
||
· ──
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict-function/input.js:3:3]
|
||
2 │ "use strict";
|
||
3 │ 05;
|
||
· ──
|
||
4 │ }
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict-function/input.js:8:3]
|
||
7 │ "use strict";
|
||
8 │ 04;
|
||
· ──
|
||
9 │ 05;
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× '0'-prefixed octal literals and octal escape sequences are deprecated
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict-function/input.js:9:3]
|
||
8 │ 04;
|
||
9 │ 05;
|
||
· ──
|
||
10 │ }
|
||
╰────
|
||
help: for octal literals use the '0o' prefix instead
|
||
|
||
× Keywords cannot contain escape characters
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/object/invalid-escape-get/input.js:1:4]
|
||
1 │ ({ ge\u0074 x() {} })
|
||
· ────────
|
||
╰────
|
||
|
||
× A 'get' accessor must not have any formal parameters.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/object/invalid-getter-param/input.js:1:12]
|
||
1 │ ({ get prop(x) {} })
|
||
· ───
|
||
╰────
|
||
help: Remove these parameters here
|
||
|
||
× TS(1049): A 'set' accessor must have exactly one parameter.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/object/invalid-setter-no-param/input.js:1:9]
|
||
1 │ ({ set x(){} })
|
||
· ──
|
||
╰────
|
||
help: Add a parameter here
|
||
|
||
× TS(1049): A 'set' accessor must have exactly one parameter.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/object/invalid-setter-two-params/input.js:1:12]
|
||
1 │ ({ set prop(x, y) {} })
|
||
· ──────
|
||
╰────
|
||
help: Remove parameters except the first one here
|
||
|
||
× `for await` loops are only allowed within async functions and at the top levels of modules
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowAwaitOutsideFunction-false/input.js:1:5]
|
||
1 │ for await (const i of imports) {}
|
||
· ─────
|
||
╰────
|
||
help: Either remove this `await` or add the `async` keyword to the enclosing function
|
||
|
||
× Unexpected new.target expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowNewTargetOutsideFunction-false/input.js:1:11]
|
||
1 │ const x = new.target;
|
||
· ──────────
|
||
╰────
|
||
help: new.target is only allowed in constructors, functions, and class field initializers
|
||
|
||
× Unexpected new.target expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowNewTargetOutsideFunction-false-2/input.js:1:17]
|
||
1 │ const y = () => new.target;
|
||
· ──────────
|
||
╰────
|
||
help: new.target is only allowed in constructors, functions, and class field initializers
|
||
|
||
× TS(18041): A 'return' statement cannot be used inside a class static block.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowReturnOutsideFunction-true-invalid-in-static-block/input.js:3:5]
|
||
2 │ static {
|
||
3 │ return 0;
|
||
· ──────
|
||
4 │ }
|
||
╰────
|
||
|
||
× A 'yield' expression is only allowed in a generator body.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowYieldOutsideFunction-false/input.js:1:1]
|
||
1 │ yield 1;
|
||
· ─────
|
||
╰────
|
||
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
|
||
|
||
× A 'yield' expression is only allowed in a generator body.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowYieldOutsideFunction-true/input.js:1:1]
|
||
1 │ yield 1;
|
||
· ─────
|
||
2 │
|
||
╰────
|
||
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
|
||
|
||
× A 'yield' expression is only allowed in a generator body.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowYieldOutsideFunction-true/input.js:4:3]
|
||
3 │ function fn() {
|
||
4 │ yield 1;
|
||
· ─────
|
||
5 │ }
|
||
╰────
|
||
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/regression/13694-invalid-dot-bracketL-member/input.js:1:3]
|
||
1 │ a.[b]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/regression/T2921/input.js:1:5]
|
||
1 │ a <== b;
|
||
· ─
|
||
╰────
|
||
|
||
× Decimals with leading zeros are not allowed in strict mode
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/regression/non-octal-float-strict-mode/input.js:1:1]
|
||
1 │ 09.5
|
||
· ────
|
||
╰────
|
||
help: remove the leading zero
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/regression/octal-float-fail/input.js:1:3]
|
||
1 │ 07.5
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/input.js:2:5]
|
||
1 │ let bar;
|
||
2 │ var foo = 1;
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
3 │ let foo = 1;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/input.js:3:7]
|
||
2 │ let bar;
|
||
3 │ var foo = 1;
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
4 │ let foo = 1;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
5 │ }
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/input.js:2:5]
|
||
1 │ let bar;
|
||
2 │ let foo = 1;
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
3 │ var foo = 1;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/input.js:3:7]
|
||
2 │ let bar;
|
||
3 │ let foo = 1;
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
4 │ var foo = 1;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
5 │ }
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/input.js:2:11]
|
||
1 │ try {
|
||
2 │ } catch ([foo, foo]) {
|
||
· ─┬─ ─┬─
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `foo` has already been declared here
|
||
3 │ }
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/input.js:1:5]
|
||
1 │ let foo; try {} catch (foo) {} let foo;
|
||
· ─┬─ ─┬─
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `foo` has already been declared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/input.js:2:10]
|
||
1 │ try {
|
||
2 │ } catch (foo) {
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
3 │ function foo() {}
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
4 │ }
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/input.js:2:10]
|
||
1 │ try {
|
||
2 │ } catch (foo) {
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
3 │ let foo;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
4 │ }
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/input.js:2:15]
|
||
1 │ try {
|
||
2 │ } catch ({ a: foo, b: { c: [foo] } }) {
|
||
· ─┬─ ─┬─
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `foo` has already been declared here
|
||
3 │ }
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/input.js:2:11]
|
||
1 │ try {
|
||
2 │ } catch ([foo]) {
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
3 │ var foo;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
4 │ }
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/input.js:2:12]
|
||
1 │ try {
|
||
2 │ } catch ({ foo }) {
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
3 │ var foo;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
4 │ }
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/input.js:1:7]
|
||
1 │ class foo {};
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
2 │ class foo {};
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/input.js:1:7]
|
||
1 │ class foo {};
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
2 │ const foo = 1;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/input.js:1:7]
|
||
1 │ class foo {};
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
2 │ function foo () {};
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/input.js:1:7]
|
||
1 │ class foo {};
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
2 │ let foo = 1;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/input.js:1:7]
|
||
1 │ class foo {};
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
2 │ var foo;
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/input.js:1:7]
|
||
1 │ const foo=1, foo=2;
|
||
· ─┬─ ─┬─
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `foo` has already been declared here
|
||
╰────
|
||
|
||
× Identifier `f` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/input.js:1:12]
|
||
1 │ { function f() {} function* f() {} }
|
||
· ┬ ┬
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `f` has already been declared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/input.js:1:10]
|
||
1 │ function foo() {}
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
2 │ function foo() {}
|
||
· ─┬─
|
||
· ╰── It can not be redeclared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/input.js:1:12]
|
||
1 │ { function foo() {} function foo() {} }
|
||
· ─┬─ ─┬─
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `foo` has already been declared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/input.js:2:12]
|
||
1 │ {
|
||
2 │ function foo() {}
|
||
· ─┬─
|
||
· ╰── `foo` has already been declared here
|
||
3 │ var foo = 1;
|
||
· ───┬───
|
||
· ╰── It can not be redeclared here
|
||
4 │ }
|
||
╰────
|
||
|
||
× Identifier `f` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/input.js:1:13]
|
||
1 │ { function* f() {} function f() {} }
|
||
· ┬ ┬
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `f` has already been declared here
|
||
╰────
|
||
|
||
× Identifier `foo` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/input.js:1:5]
|
||
1 │ let foo, foo;
|
||
· ─┬─ ─┬─
|
||
· │ ╰── It can not be redeclared here
|
||
· ╰── `foo` has already been declared here
|
||
╰────
|
||
|
||
× Identifier `a` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/input.js:2:7]
|
||
1 │ {
|
||
2 │ let a;
|
||
· ┬
|
||
· ╰── `a` has already been declared here
|
||
3 │ { var a; }
|
||
· ┬
|
||
· ╰── It can not be redeclared here
|
||
4 │ }
|
||
╰────
|
||
|
||
× Identifier `i` has already been declared
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/for-var/input.js:1:10]
|
||
1 │ for (let i = 0;;) {
|
||
· ┬
|
||
· ╰── `i` has already been declared here
|
||
2 │ var i;
|
||
· ┬
|
||
· ╰── It can not be redeclared here
|
||
3 │ }
|
||
╰────
|
||
|
||
× Export 'encrypt' is not defined
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export/input.js:1:10]
|
||
1 │ export { encrypt };
|
||
· ───────
|
||
╰────
|
||
|
||
× Export 'encrypt' is not defined
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-as/input.js:1:10]
|
||
1 │ export { encrypt as decrypt };
|
||
· ───────
|
||
2 │ function decrypt() {}
|
||
╰────
|
||
help: Did you mean 'decrypt'?
|
||
|
||
× Export 'encrypt' is not defined
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/input.js:1:10]
|
||
1 │ export { encrypt as default };
|
||
· ───────
|
||
╰────
|
||
|
||
× Export 'encrypt' is not defined
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-block/input.js:4:10]
|
||
3 │ }
|
||
4 │ export { encrypt }
|
||
· ───────
|
||
╰────
|
||
|
||
× Export 'Object' is not defined
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/input.js:1:10]
|
||
1 │ export { Object };
|
||
· ──────
|
||
╰────
|
||
|
||
× Export 'Object' is not defined
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/input.js:1:10]
|
||
1 │ export { Object as Obj };
|
||
· ──────
|
||
╰────
|
||
|
||
× Invalid function declaration
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-if/input.js:2:11]
|
||
1 │ export { encrypt };
|
||
2 │ if (true) function encrypt() {}
|
||
· ─────────────────────
|
||
╰────
|
||
help: In strict mode code, functions can only be declared at top level or inside a block
|
||
|
||
× `await` is only allowed within async functions and at the top levels of modules
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/sourcetype-commonjs/invalid-top-level-await/input.js:1:1]
|
||
1 │ await Promise.resolve();
|
||
· ─────
|
||
╰────
|
||
help: Either remove this `await` or add the `async` keyword to the enclosing function
|
||
|
||
× A 'yield' expression is only allowed in a generator body.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/sourcetype-commonjs/invalid-top-level-yield/input.js:1:1]
|
||
1 │ yield 0;
|
||
· ─────
|
||
╰────
|
||
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/108/input.js:1:17]
|
||
1 │ var x = /[P QR]/\u0067
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Expected `}` but found `EOF`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/345/input.js:1:2]
|
||
1 │ {
|
||
· ┬
|
||
· ╰── Opened here
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/346/input.js:1:1]
|
||
1 │ }
|
||
· ─
|
||
╰────
|
||
|
||
× Invalid Character `a`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/347/input.js:1:3]
|
||
1 │ 3ea
|
||
· ▲
|
||
╰────
|
||
|
||
× Invalid characters after number
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/347/input.js:1:3]
|
||
1 │ 3ea
|
||
· ─
|
||
╰────
|
||
|
||
× Invalid characters after number
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/348/input.js:1:2]
|
||
1 │ 3in []
|
||
· ──
|
||
╰────
|
||
|
||
× Unexpected end of file
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/349/input.js:1:3]
|
||
1 │ 3e
|
||
╰────
|
||
|
||
× Unexpected end of file
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/350/input.js:1:4]
|
||
1 │ 3e+
|
||
╰────
|
||
|
||
× Unexpected end of file
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/351/input.js:1:4]
|
||
1 │ 3e-
|
||
╰────
|
||
|
||
× Invalid characters after number
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/352/input.js:1:2]
|
||
1 │ 3x
|
||
· ─
|
||
╰────
|
||
|
||
× Invalid characters after number
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/353/input.js:1:2]
|
||
1 │ 3x0
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected end of file
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/354/input.js:1:3]
|
||
1 │ 0x
|
||
╰────
|
||
|
||
× Invalid characters after number
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/357/input.js:1:3]
|
||
1 │ 01a
|
||
· ─
|
||
╰────
|
||
|
||
× Invalid characters after number
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/358/input.js:1:2]
|
||
1 │ 3in[]
|
||
· ──
|
||
╰────
|
||
|
||
× Invalid characters after number
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/359/input.js:1:4]
|
||
1 │ 0x3in[]
|
||
· ──
|
||
╰────
|
||
|
||
× Unterminated string
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/360/input.js:1:1]
|
||
1 │ "Hello
|
||
· ───────
|
||
2 │ World"
|
||
╰────
|
||
|
||
× Invalid Character `\`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/362/input.js:1:8]
|
||
1 │ x\u005c
|
||
╰────
|
||
|
||
× Invalid Character `*`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/363/input.js:1:8]
|
||
1 │ x\u002a
|
||
╰────
|
||
|
||
× Unterminated regular expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/364/input.js:1:1]
|
||
1 │ /
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/364/input.js:1:1]
|
||
1 │ /
|
||
· ─
|
||
╰────
|
||
|
||
× Unterminated regular expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/365/input.js:1:1]
|
||
1 │ /test
|
||
· ─────
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/365/input.js:1:1]
|
||
1 │ /test
|
||
· ─────
|
||
╰────
|
||
|
||
× Invalid Unicode escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/366/input.js:1:17]
|
||
1 │ var x = /[a-z]/\ux
|
||
· ─
|
||
╰────
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/366/input.js:1:16]
|
||
1 │ var x = /[a-z]/\ux
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/367/input.js:1:1]
|
||
1 │ 3 = 4
|
||
· ─
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/368/input.js:1:1]
|
||
1 │ func() = 4
|
||
· ──────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/369/input.js:1:2]
|
||
1 │ (1 + 1) = 10
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/370/input.js:1:1]
|
||
1 │ 1++
|
||
· ─
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/371/input.js:1:1]
|
||
1 │ 1--
|
||
· ─
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/372/input.js:1:3]
|
||
1 │ ++1
|
||
· ─
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/373/input.js:1:3]
|
||
1 │ --1
|
||
· ─
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/374/input.js:1:6]
|
||
1 │ for((1 + 1) in list) process(x);
|
||
· ─────
|
||
╰────
|
||
|
||
× Expected `]` but found `EOF`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/375/input.js:1:2]
|
||
1 │ [
|
||
╰────
|
||
|
||
× Expected `]` but found `EOF`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/376/input.js:1:3]
|
||
1 │ [,
|
||
╰────
|
||
|
||
× Expected `}` but found `EOF`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/377/input.js:1:6]
|
||
1 │ 1 + {
|
||
╰────
|
||
|
||
× Expected `}` but found `EOF`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/378/input.js:2:1]
|
||
1 │ 1 + { t:t
|
||
╰────
|
||
|
||
× Expected `}` but found `EOF`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/379/input.js:1:11]
|
||
1 │ 1 + { t:t,
|
||
╰────
|
||
|
||
× Unterminated regular expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/380/input.js:1:9]
|
||
1 │ var x = /
|
||
· ──
|
||
2 │ /
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/380/input.js:1:9]
|
||
1 │ ╭─▶ var x = /
|
||
2 │ ╰─▶ /
|
||
╰────
|
||
|
||
× Unterminated string
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/381/input.js:1:9]
|
||
1 │ var x = "
|
||
· ──
|
||
╰────
|
||
|
||
× Identifier expected. 'if' is a reserved word that cannot be used here.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/382/input.js:1:5]
|
||
1 │ var if = 42
|
||
· ──
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/383/input.js:1:1]
|
||
1 │ i + 2 = 42
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/384/input.js:1:1]
|
||
1 │ +i = 42
|
||
· ──
|
||
╰────
|
||
|
||
× Expected `)` but found `EOF`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/385/input.js:1:6]
|
||
1 │ 1 + (
|
||
╰────
|
||
|
||
× Expected `}` but found `EOF`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/386/input.js:4:2]
|
||
3 │
|
||
4 │ {
|
||
· ┬
|
||
· ╰── Opened here
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/387/input.js:4:1]
|
||
3 │ comment */
|
||
4 │ )
|
||
· ─
|
||
╰────
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/388/input.js:1:6]
|
||
1 │ { set 1 }
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/389/input.js:1:6]
|
||
1 │ { get 2 }
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/390/input.js:1:11]
|
||
1 │ ({ set: s(if) { } })
|
||
· ──
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/391/input.js:1:10]
|
||
1 │ ({ set s(.) { } })
|
||
· ─
|
||
╰────
|
||
|
||
× Expected `,` or `}` but found `{`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/392/input.js:1:13]
|
||
1 │ ({ set: s() { } })
|
||
· ┬ ┬
|
||
· │ ╰── `,` or `}` expected
|
||
· ╰── Opened here
|
||
╰────
|
||
|
||
× Expected `,` or `}` but found `{`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/393/input.js:1:17]
|
||
1 │ ({ set: s(a, b) { } })
|
||
· ┬ ┬
|
||
· │ ╰── `,` or `}` expected
|
||
· ╰── Opened here
|
||
╰────
|
||
|
||
× Expected `,` or `}` but found `{`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/394/input.js:1:14]
|
||
1 │ ({ get: g(d) { } })
|
||
· ┬ ┬
|
||
· │ ╰── `,` or `}` expected
|
||
· ╰── Opened here
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/395/input.js:1:15]
|
||
1 │ function t(...) { }
|
||
· ─
|
||
╰────
|
||
|
||
× A rest parameter must be last in a parameter list
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/396/input.js:1:12]
|
||
1 │ function t(...rest, b) { }
|
||
· ───────
|
||
╰────
|
||
|
||
× Identifier expected. 'if' is a reserved word that cannot be used here.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/397/input.js:1:12]
|
||
1 │ function t(if) { }
|
||
· ──
|
||
╰────
|
||
|
||
× Identifier expected. 'true' is a reserved word that cannot be used here.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/398/input.js:1:12]
|
||
1 │ function t(true) { }
|
||
· ────
|
||
╰────
|
||
|
||
× Identifier expected. 'false' is a reserved word that cannot be used here.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/399/input.js:1:12]
|
||
1 │ function t(false) { }
|
||
· ─────
|
||
╰────
|
||
|
||
× Identifier expected. 'null' is a reserved word that cannot be used here.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/400/input.js:1:12]
|
||
1 │ function t(null) { }
|
||
· ────
|
||
╰────
|
||
|
||
× Expected `Identifier` but found `null`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/401/input.js:1:10]
|
||
1 │ function null() { }
|
||
· ──┬─
|
||
· ╰── `Identifier` expected
|
||
╰────
|
||
|
||
× Expected `Identifier` but found `true`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/402/input.js:1:10]
|
||
1 │ function true() { }
|
||
· ──┬─
|
||
· ╰── `Identifier` expected
|
||
╰────
|
||
|
||
× Expected `Identifier` but found `false`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/403/input.js:1:10]
|
||
1 │ function false() { }
|
||
· ──┬──
|
||
· ╰── `Identifier` expected
|
||
╰────
|
||
|
||
× Expected `Identifier` but found `if`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/404/input.js:1:10]
|
||
1 │ function if() { }
|
||
· ─┬
|
||
· ╰── `Identifier` expected
|
||
╰────
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/405/input.js:1:2]
|
||
1 │ a b;
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Expected `(` but found `.`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/406/input.js:1:3]
|
||
1 │ if.a;
|
||
· ┬
|
||
· ╰── `(` expected
|
||
╰────
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/407/input.js:1:2]
|
||
1 │ a if;
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Expected a semicolon or an implicit semicolon after a statement, but found none
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/408/input.js:1:2]
|
||
1 │ a class;
|
||
· ▲
|
||
╰────
|
||
help: Try inserting a semicolon here
|
||
|
||
× Illegal break statement
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/409/input.js:1:1]
|
||
1 │ break
|
||
· ─────
|
||
╰────
|
||
help: A `break` statement can only be used within an enclosing iteration or switch statement.
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/410/input.js:1:7]
|
||
1 │ break 1;
|
||
· ─
|
||
╰────
|
||
|
||
× Illegal continue statement: no surrounding iteration statement
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/411/input.js:1:1]
|
||
1 │ continue
|
||
· ────────
|
||
╰────
|
||
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/412/input.js:1:10]
|
||
1 │ continue 2;
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/413/input.js:1:6]
|
||
1 │ throw
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/414/input.js:1:6]
|
||
1 │ throw;
|
||
· ─
|
||
╰────
|
||
|
||
× Only a single declaration is allowed in a `for...in` statement
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/415/input.js:1:6]
|
||
1 │ for (var i, i2 in {});
|
||
· ─────────
|
||
╰────
|
||
|
||
× Expected `;` but found `)`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/416/input.js:1:15]
|
||
1 │ for ((i in {}));
|
||
· ┬
|
||
· ╰── `;` expected
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/417/input.js:1:6]
|
||
1 │ for (i + 1 in {});
|
||
· ─────
|
||
╰────
|
||
|
||
× Cannot assign to this expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/418/input.js:1:6]
|
||
1 │ for (+i in {});
|
||
· ──
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/419/input.js:1:10]
|
||
1 │ if(false)
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/420/input.js:1:25]
|
||
1 │ if(false) doThis(); else
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/421/input.js:1:3]
|
||
1 │ do
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/422/input.js:1:13]
|
||
1 │ while(false)
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/423/input.js:1:8]
|
||
1 │ for(;;)
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/424/input.js:1:8]
|
||
1 │ with(x)
|
||
╰────
|
||
|
||
× Missing catch or finally clause
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/425/input.js:1:8]
|
||
1 │ try { }
|
||
╰────
|
||
help: Either unwrap this try block or add catch / finally clause
|
||
|
||
× Invalid Character `‿`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/426/input.js:1:1]
|
||
1 │ ‿ = 10
|
||
· ─
|
||
╰────
|
||
|
||
× TS(1113): A 'default' clause cannot appear more than once in a 'switch' statement.
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/427/input.js:1:14]
|
||
1 │ switch (c) { default: default: }
|
||
· ────┬─── ────┬───
|
||
· │ ╰── Another 'default' clause cannot appear here.
|
||
· ╰── First 'default' clause is here.
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/428/input.js:1:9]
|
||
1 │ new X()."s"
|
||
· ───
|
||
╰────
|
||
|
||
× Unterminated multiline comment
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/429/input.js:1:1]
|
||
1 │ /*
|
||
· ──
|
||
╰────
|
||
|
||
× Unterminated multiline comment
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/430/input.js:1:1]
|
||
1 │ ╭─▶ /*
|
||
2 │ │
|
||
3 │ ╰─▶
|
||
╰────
|
||
|
||
× Unterminated multiline comment
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/431/input.js:1:1]
|
||
1 │ /**
|
||
· ───
|
||
╰────
|
||
|
||
× Unterminated multiline comment
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/432/input.js:1:1]
|
||
1 │ ╭─▶ /*
|
||
2 │ │
|
||
3 │ ╰─▶ *
|
||
╰────
|
||
|
||
× Unterminated multiline comment
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/433/input.js:1:1]
|
||
1 │ /*hello
|
||
· ───────
|
||
╰────
|
||
|
||
× Unterminated multiline comment
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/434/input.js:1:1]
|
||
1 │ /*hello *
|
||
· ──────────
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/435/input.js:2:1]
|
||
1 │
|
||
2 │ ]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/436/input.js:2:1]
|
||
1 │
|
||
]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/437/input.js:2:1]
|
||
1 │
|
||
2 │ ]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/438/input.js:3:1]
|
||
2 │
|
||
]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/439/input.js:2:1]
|
||
1 │ //
|
||
2 │ ]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/440/input.js:3:1]
|
||
2 │
|
||
]
|
||
· ─
|
||
╰────
|
||
|
||
× Unterminated regular expression
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/441/input.js:1:1]
|
||
1 │ /a\
|
||
· ────
|
||
2 │ /
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/441/input.js:1:1]
|
||
1 │ ╭─▶ /a\
|
||
2 │ ╰─▶ /
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/442/input.js:3:1]
|
||
2 │
|
||
3 │ ]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/443/input.js:2:3]
|
||
1 │ /*
|
||
2 │ */]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/444/input.js:3:3]
|
||
2 │
|
||
*/]
|
||
· ─
|
||
╰────
|
||
|
||
× Unexpected token
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/445/input.js:3:3]
|
||
2 │
|
||
3 │ */]
|
||
· ─
|
||
╰────
|
||
|
||
× Invalid Unicode escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/446/input.js:1:2]
|
||
1 │ \\
|
||
· ─
|
||
╰────
|
||
|
||
× Invalid Character `\`
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/447/input.js:1:7]
|
||
1 │ \u005c
|
||
╰────
|
||
|
||
× Invalid Unicode escape sequence
|
||
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/448/input.js:1:2]
|
||
1 │ \x
|
||
· ─
|
||
╰────
|
||
|
||
× Invalid Character ` |