89a737c871
* First draft Everything works, the error messages for unmatched opening elements could still use improvement, plus there is tonnes of unused and ugly code. 1. Make sure the parser can recover from all kinds of unclosed tags. 2. Improve the parse tree for unmatched opening tags. 3. Better errors at some point. * Lots of cleanup * Improve readability of construction/fix lint * improve line-length formatting
40 lines
1.7 KiB
Plaintext
40 lines
1.7 KiB
Plaintext
tests/cases/compiler/a.jsx(1,13): error TS1109: Expression expected.
|
|
tests/cases/compiler/a.jsx(4,1): error TS2657: JSX expressions must have one parent element.
|
|
tests/cases/compiler/a.jsx(4,5): error TS1003: Identifier expected.
|
|
tests/cases/compiler/a.jsx(4,13): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
|
tests/cases/compiler/a.jsx(4,16): error TS17002: Expected corresponding JSX closing tag for 'number'.
|
|
tests/cases/compiler/a.jsx(5,1): error TS2657: JSX expressions must have one parent element.
|
|
tests/cases/compiler/a.jsx(5,5): error TS1003: Identifier expected.
|
|
tests/cases/compiler/a.jsx(5,6): error TS17008: JSX element 'number' has no corresponding closing tag.
|
|
tests/cases/compiler/a.jsx(5,14): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
|
tests/cases/compiler/a.jsx(6,1): error TS1005: '</' expected.
|
|
|
|
|
|
==== tests/cases/compiler/a.jsx (10 errors) ====
|
|
Foo<number>();
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
Foo<number>(1);
|
|
Foo<number>``;
|
|
<Foo<number>></Foo>;
|
|
~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2657: JSX expressions must have one parent element.
|
|
~
|
|
!!! error TS1003: Identifier expected.
|
|
~
|
|
!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
|
~~~
|
|
!!! error TS17002: Expected corresponding JSX closing tag for 'number'.
|
|
<Foo<number>/>;
|
|
~~~~~~~~~~~~~~~
|
|
~
|
|
!!! error TS1003: Identifier expected.
|
|
~~~~~~
|
|
!!! error TS17008: JSX element 'number' has no corresponding closing tag.
|
|
~
|
|
!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
|
|
|
|
|
|
!!! error TS2657: JSX expressions must have one parent element.
|
|
|
|
!!! error TS1005: '</' expected. |