@@ -87,20 +87,6 @@ impl MetaVarExpr {
87
87
}
88
88
}
89
89
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
-
104
90
// Checks if there are any remaining tokens. For example, `${ignore(ident ... a b c ...)}`
105
91
fn check_trailing_token < ' psess > (
106
92
iter : & mut TokenStreamIter < ' _ > ,
@@ -117,6 +103,20 @@ fn check_trailing_token<'psess>(
117
103
}
118
104
}
119
105
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
+
120
120
/// Parse a meta-variable `concat` expression: `concat($metavar, ident, ...)`.
121
121
fn parse_concat < ' psess > (
122
122
iter : & mut TokenStreamIter < ' _ > ,
0 commit comments