This repository was archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
08b49db
commit ec92885
Showing
10 changed files
with
170 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/rome_js_parser/test_data/inline/err/jsx_element_attribute_expression_error.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div className={asdf asdf} />; |
77 changes: 77 additions & 0 deletions
77
crates/rome_js_parser/test_data/inline/err/jsx_element_attribute_expression_error.rast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
JsModule { | ||
interpreter_token: missing (optional), | ||
directives: JsDirectiveList [], | ||
items: JsModuleItemList [ | ||
JsExpressionStatement { | ||
expression: JsxTagExpression { | ||
tag: JsxSelfClosingElement { | ||
l_angle_token: L_ANGLE@0..1 "<" [] [], | ||
name: JsxName { | ||
value_token: JSX_IDENT@1..5 "div" [] [Whitespace(" ")], | ||
}, | ||
type_arguments: missing (optional), | ||
attributes: JsxAttributeList [ | ||
JsxAttribute { | ||
name: JsxName { | ||
value_token: JSX_IDENT@5..14 "className" [] [], | ||
}, | ||
initializer: JsxAttributeInitializerClause { | ||
eq_token: EQ@14..15 "=" [] [], | ||
value: JsxExpressionAttributeValue { | ||
l_curly_token: L_CURLY@15..16 "{" [] [], | ||
expression: JsIdentifierExpression { | ||
name: JsReferenceIdentifier { | ||
value_token: IDENT@16..21 "asdf" [] [Whitespace(" ")], | ||
}, | ||
}, | ||
r_curly_token: R_CURLY@21..27 "}" [Skipped("asdf")] [Whitespace(" ")], | ||
}, | ||
}, | ||
}, | ||
], | ||
slash_token: SLASH@27..28 "/" [] [], | ||
r_angle_token: R_ANGLE@28..29 ">" [] [], | ||
}, | ||
}, | ||
semicolon_token: SEMICOLON@29..30 ";" [] [], | ||
}, | ||
], | ||
eof_token: EOF@30..31 "" [Newline("\n")] [], | ||
} | ||
|
||
0: JS_MODULE@0..31 | ||
0: (empty) | ||
1: JS_DIRECTIVE_LIST@0..0 | ||
2: JS_MODULE_ITEM_LIST@0..30 | ||
0: JS_EXPRESSION_STATEMENT@0..30 | ||
0: JSX_TAG_EXPRESSION@0..29 | ||
0: JSX_SELF_CLOSING_ELEMENT@0..29 | ||
0: L_ANGLE@0..1 "<" [] [] | ||
1: JSX_NAME@1..5 | ||
0: JSX_IDENT@1..5 "div" [] [Whitespace(" ")] | ||
2: (empty) | ||
3: JSX_ATTRIBUTE_LIST@5..27 | ||
0: JSX_ATTRIBUTE@5..27 | ||
0: JSX_NAME@5..14 | ||
0: JSX_IDENT@5..14 "className" [] [] | ||
1: JSX_ATTRIBUTE_INITIALIZER_CLAUSE@14..27 | ||
0: EQ@14..15 "=" [] [] | ||
1: JSX_EXPRESSION_ATTRIBUTE_VALUE@15..27 | ||
0: L_CURLY@15..16 "{" [] [] | ||
1: JS_IDENTIFIER_EXPRESSION@16..21 | ||
0: JS_REFERENCE_IDENTIFIER@16..21 | ||
0: IDENT@16..21 "asdf" [] [Whitespace(" ")] | ||
2: R_CURLY@21..27 "}" [Skipped("asdf")] [Whitespace(" ")] | ||
4: SLASH@27..28 "/" [] [] | ||
5: R_ANGLE@28..29 ">" [] [] | ||
1: SEMICOLON@29..30 ";" [] [] | ||
3: EOF@30..31 "" [Newline("\n")] [] | ||
-- | ||
error[SyntaxError]: expected `}` but instead found `asdf` | ||
┌─ jsx_element_attribute_expression_error.jsx:1:22 | ||
│ | ||
1 │ <div className={asdf asdf} />; | ||
│ ^^^^ unexpected | ||
|
||
-- | ||
<div className={asdf asdf} />; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters