Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_parser): TsPropertySignatureClassMember with initializer #3003

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/rome_js_factory/src/generated/node_factory.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion crates/rome_js_factory/src/generated/syntax_factory.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -99,6 +99,7 @@ JsModule {
value: IDENT@118..123 "prop" [] [Whitespace(" ")],
},
property_annotation: missing (optional),
value: missing (optional),
semicolon_token: missing (optional),
},
],
Expand Down Expand Up @@ -182,6 +183,7 @@ JsModule {
0: IDENT@118..123 "prop" [] [Whitespace(" ")]
2: (empty)
3: (empty)
4: (empty)
8: R_CURLY@123..124 "}" [] []
3: EOF@124..125 "" [Newline("\n")] []
--
Expand Down
Expand Up @@ -13,30 +13,28 @@ JsModule {
implements_clause: missing (optional),
l_curly_token: L_CURLY@17..18 "{" [] [],
members: JsClassMemberList [
JsUnknownMember {
items: [
TsPropertySignatureModifierList [
TsAbstractModifier {
modifier_token: ABSTRACT_KW@18..32 "abstract" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")],
},
],
JsLiteralMemberName {
value: IDENT@32..36 "name" [] [],
TsPropertySignatureClassMember {
modifiers: TsPropertySignatureModifierList [
TsAbstractModifier {
modifier_token: ABSTRACT_KW@18..32 "abstract" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")],
},
TsTypeAnnotation {
colon_token: COLON@36..38 ":" [] [Whitespace(" ")],
ty: TsStringType {
string_token: STRING_KW@38..45 "string" [] [Whitespace(" ")],
},
],
name: JsLiteralMemberName {
value: IDENT@32..36 "name" [] [],
},
property_annotation: TsTypeAnnotation {
colon_token: COLON@36..38 ":" [] [Whitespace(" ")],
ty: TsStringType {
string_token: STRING_KW@38..45 "string" [] [Whitespace(" ")],
},
JsInitializerClause {
eq_token: EQ@45..47 "=" [] [Whitespace(" ")],
expression: JsStringLiteralExpression {
value_token: JS_STRING_LITERAL@47..49 "\"\"" [] [],
},
},
value: JsInitializerClause {
eq_token: EQ@45..47 "=" [] [Whitespace(" ")],
expression: JsStringLiteralExpression {
value_token: JS_STRING_LITERAL@47..49 "\"\"" [] [],
},
SEMICOLON@49..50 ";" [] [],
],
},
semicolon_token: SEMICOLON@49..50 ";" [] [],
},
],
r_curly_token: R_CURLY@50..52 "}" [Newline("\n")] [],
Expand All @@ -59,7 +57,7 @@ JsModule {
5: (empty)
6: L_CURLY@17..18 "{" [] []
7: JS_CLASS_MEMBER_LIST@18..50
0: JS_UNKNOWN_MEMBER@18..50
0: TS_PROPERTY_SIGNATURE_CLASS_MEMBER@18..50
0: TS_PROPERTY_SIGNATURE_MODIFIER_LIST@18..32
0: TS_ABSTRACT_MODIFIER@18..32
0: ABSTRACT_KW@18..32 "abstract" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")]
Expand Down
Expand Up @@ -15,19 +15,19 @@ JsModule {
implements_clause: missing (optional),
l_curly_token: L_CURLY@16..18 "{" [] [Whitespace(" ")],
members: JsClassMemberList [
JsUnknownMember {
items: [
TsPropertySignatureModifierList [],
JsLiteralMemberName {
value: IDENT@18..23 "prop" [] [Whitespace(" ")],
},
JsInitializerClause {
eq_token: EQ@23..25 "=" [] [Whitespace(" ")],
expression: JsStringLiteralExpression {
value_token: JS_STRING_LITERAL@25..32 "\"test\"" [] [Whitespace(" ")],
},
TsPropertySignatureClassMember {
modifiers: TsPropertySignatureModifierList [],
name: JsLiteralMemberName {
value: IDENT@18..23 "prop" [] [Whitespace(" ")],
},
property_annotation: missing (optional),
value: JsInitializerClause {
eq_token: EQ@23..25 "=" [] [Whitespace(" ")],
expression: JsStringLiteralExpression {
value_token: JS_STRING_LITERAL@25..32 "\"test\"" [] [Whitespace(" ")],
},
],
},
semicolon_token: missing (optional),
},
],
r_curly_token: R_CURLY@32..33 "}" [] [],
Expand All @@ -44,23 +44,23 @@ JsModule {
implements_clause: missing (optional),
l_curly_token: L_CURLY@42..44 "{" [] [Whitespace(" ")],
members: JsClassMemberList [
JsUnknownMember {
items: [
TsPropertySignatureModifierList [
TsDeclareModifier {
modifier_token: DECLARE_KW@44..52 "declare" [] [Whitespace(" ")],
},
],
JsLiteralMemberName {
value: IDENT@52..57 "prop" [] [Whitespace(" ")],
},
JsInitializerClause {
eq_token: EQ@57..59 "=" [] [Whitespace(" ")],
expression: JsStringLiteralExpression {
value_token: JS_STRING_LITERAL@59..66 "\"test\"" [] [Whitespace(" ")],
},
TsPropertySignatureClassMember {
modifiers: TsPropertySignatureModifierList [
TsDeclareModifier {
modifier_token: DECLARE_KW@44..52 "declare" [] [Whitespace(" ")],
},
],
name: JsLiteralMemberName {
value: IDENT@52..57 "prop" [] [Whitespace(" ")],
},
property_annotation: missing (optional),
value: JsInitializerClause {
eq_token: EQ@57..59 "=" [] [Whitespace(" ")],
expression: JsStringLiteralExpression {
value_token: JS_STRING_LITERAL@59..66 "\"test\"" [] [Whitespace(" ")],
},
},
semicolon_token: missing (optional),
},
],
r_curly_token: R_CURLY@66..67 "}" [] [],
Expand All @@ -85,14 +85,16 @@ JsModule {
5: (empty)
6: L_CURLY@16..18 "{" [] [Whitespace(" ")]
7: JS_CLASS_MEMBER_LIST@18..32
0: JS_UNKNOWN_MEMBER@18..32
0: TS_PROPERTY_SIGNATURE_CLASS_MEMBER@18..32
0: TS_PROPERTY_SIGNATURE_MODIFIER_LIST@18..18
1: JS_LITERAL_MEMBER_NAME@18..23
0: IDENT@18..23 "prop" [] [Whitespace(" ")]
2: JS_INITIALIZER_CLAUSE@23..32
2: (empty)
3: JS_INITIALIZER_CLAUSE@23..32
0: EQ@23..25 "=" [] [Whitespace(" ")]
1: JS_STRING_LITERAL_EXPRESSION@25..32
0: JS_STRING_LITERAL@25..32 "\"test\"" [] [Whitespace(" ")]
4: (empty)
8: R_CURLY@32..33 "}" [] []
1: JS_CLASS_DECLARATION@33..67
0: (empty)
Expand All @@ -104,16 +106,18 @@ JsModule {
5: (empty)
6: L_CURLY@42..44 "{" [] [Whitespace(" ")]
7: JS_CLASS_MEMBER_LIST@44..66
0: JS_UNKNOWN_MEMBER@44..66
0: TS_PROPERTY_SIGNATURE_CLASS_MEMBER@44..66
0: TS_PROPERTY_SIGNATURE_MODIFIER_LIST@44..52
0: TS_DECLARE_MODIFIER@44..52
0: DECLARE_KW@44..52 "declare" [] [Whitespace(" ")]
1: JS_LITERAL_MEMBER_NAME@52..57
0: IDENT@52..57 "prop" [] [Whitespace(" ")]
2: JS_INITIALIZER_CLAUSE@57..66
2: (empty)
3: JS_INITIALIZER_CLAUSE@57..66
0: EQ@57..59 "=" [] [Whitespace(" ")]
1: JS_STRING_LITERAL_EXPRESSION@59..66
0: JS_STRING_LITERAL@59..66 "\"test\"" [] [Whitespace(" ")]
4: (empty)
8: R_CURLY@66..67 "}" [] []
3: EOF@67..68 "" [Newline("\n")] []
--
Expand Down
Expand Up @@ -287,6 +287,7 @@ JsModule {
string_token: STRING_KW@349..355 "string" [] [],
},
},
value: missing (optional),
semicolon_token: SEMICOLON@355..356 ";" [] [],
},
TsMethodSignatureClassMember {
Expand Down Expand Up @@ -563,7 +564,8 @@ JsModule {
0: COLON@347..349 ":" [] [Whitespace(" ")]
1: TS_STRING_TYPE@349..355
0: STRING_KW@349..355 "string" [] []
3: SEMICOLON@355..356 ";" [] []
3: (empty)
4: SEMICOLON@355..356 ";" [] []
1: TS_METHOD_SIGNATURE_CLASS_MEMBER@356..380
0: TS_METHOD_SIGNATURE_MODIFIER_LIST@356..370
0: TS_ABSTRACT_MODIFIER@356..370
Expand Down
Expand Up @@ -31,6 +31,7 @@ JsModule {
},
},
},
value: missing (optional),
semicolon_token: SEMICOLON@46..47 ";" [] [],
},
],
Expand Down Expand Up @@ -66,6 +67,7 @@ JsModule {
0: COLON@38..40 ":" [] [Whitespace(" ")]
1: TS_STRING_TYPE@40..46
0: STRING_KW@40..46 "string" [] []
3: SEMICOLON@46..47 ";" [] []
3: (empty)
4: SEMICOLON@46..47 ";" [] []
8: R_CURLY@47..49 "}" [Newline("\n")] []
3: EOF@49..50 "" [Newline("\n")] []