@@ -87,20 +87,6 @@ impl MetaVarExpr {
8787 }
8888}
8989
90- /// Indicates what is placed in a `concat` parameter. For example, literals
91- /// (`${concat("foo", "bar")}`) or adhoc identifiers (`${concat(foo, bar)}`).
92- #[ derive( Debug , Decodable , Encodable , PartialEq ) ]
93- pub ( crate ) enum MetaVarExprConcatElem {
94- /// Identifier WITHOUT a preceding dollar sign, which means that this identifier should be
95- /// interpreted as a literal.
96- Ident ( Ident ) ,
97- /// For example, a number or a string.
98- Literal ( Symbol ) ,
99- /// Identifier WITH a preceding dollar sign, which means that this identifier should be
100- /// expanded and interpreted as a variable.
101- Var ( Ident ) ,
102- }
103-
10490// Checks if there are any remaining tokens. For example, `${ignore(ident ... a b c ...)}`
10591fn check_trailing_token < ' psess > (
10692 iter : & mut TokenStreamIter < ' _ > ,
@@ -117,6 +103,20 @@ fn check_trailing_token<'psess>(
117103 }
118104}
119105
106+ /// Indicates what is placed in a `concat` parameter. For example, literals
107+ /// (`${concat("foo", "bar")}`) or adhoc identifiers (`${concat(foo, bar)}`).
108+ #[ derive( Debug , Decodable , Encodable , PartialEq ) ]
109+ pub ( crate ) enum MetaVarExprConcatElem {
110+ /// Identifier WITHOUT a preceding dollar sign, which means that this identifier should be
111+ /// interpreted as a literal.
112+ Ident ( Ident ) ,
113+ /// For example, a number or a string.
114+ Literal ( Symbol ) ,
115+ /// Identifier WITH a preceding dollar sign, which means that this identifier should be
116+ /// expanded and interpreted as a variable.
117+ Var ( Ident ) ,
118+ }
119+
120120/// Parse a meta-variable `concat` expression: `concat($metavar, ident, ...)`.
121121fn parse_concat < ' psess > (
122122 iter : & mut TokenStreamIter < ' _ > ,
0 commit comments