@@ -96,11 +96,11 @@ fn generate(schema: &Schema, codegen: &Codegen) -> TokenStream {
9696 #( #methods) *
9797
9898 ///@@line_break
99- fn visit_object_property( & mut self , it : & mut ObjectProperty <' a>) {
100- self . convert_offset( & mut it . span. start) ;
99+ fn visit_object_property( & mut self , prop : & mut ObjectProperty <' a>) {
100+ self . convert_offset( & mut prop . span. start) ;
101101
102102 // If shorthand, span of `key` and `value` are the same
103- match ( it . shorthand, & mut it . key, & mut it . value) {
103+ match ( prop . shorthand, & mut prop . key, & mut prop . value) {
104104 ( true , PropertyKey :: StaticIdentifier ( key) , Expression :: Identifier ( value) ) => {
105105 self . visit_identifier_name( key) ;
106106 value. span = key. span;
@@ -111,15 +111,15 @@ fn generate(schema: &Schema, codegen: &Codegen) -> TokenStream {
111111 }
112112 }
113113
114- self . convert_offset( & mut it . span. end) ;
114+ self . convert_offset( & mut prop . span. end) ;
115115 }
116116
117117 ///@@line_break
118- fn visit_binding_property( & mut self , it : & mut BindingProperty <' a>) {
119- self . convert_offset( & mut it . span. start) ;
118+ fn visit_binding_property( & mut self , prop : & mut BindingProperty <' a>) {
119+ self . convert_offset( & mut prop . span. start) ;
120120
121121 // If shorthand, span of `key` and `value` are the same
122- match ( it . shorthand, & mut it . key, & mut it . value) {
122+ match ( prop . shorthand, & mut prop . key, & mut prop . value) {
123123 (
124124 true ,
125125 PropertyKey :: StaticIdentifier ( key) ,
@@ -142,7 +142,7 @@ fn generate(schema: &Schema, codegen: &Codegen) -> TokenStream {
142142 }
143143 }
144144
145- self . convert_offset( & mut it . span. end) ;
145+ self . convert_offset( & mut prop . span. end) ;
146146 }
147147
148148 ///@@line_break
@@ -170,14 +170,14 @@ fn generate(schema: &Schema, codegen: &Codegen) -> TokenStream {
170170 }
171171
172172 ///@@line_break
173- fn visit_export_specifier( & mut self , it : & mut ExportSpecifier <' a>) {
174- self . convert_offset( & mut it . span. start) ;
173+ fn visit_export_specifier( & mut self , specifier : & mut ExportSpecifier <' a>) {
174+ self . convert_offset( & mut specifier . span. start) ;
175175
176176 // `local` and `exported` have same span if e.g.:
177177 // * `export {x}`
178178 // * `export {x} from 'foo.js;`
179179 // * `export {"a-b"} from 'foo.js';`
180- match ( & mut it . local, & mut it . exported) {
180+ match ( & mut specifier . local, & mut specifier . exported) {
181181 (
182182 ModuleExportName :: IdentifierReference ( local) ,
183183 ModuleExportName :: IdentifierName ( exported) ,
@@ -205,48 +205,48 @@ fn generate(schema: &Schema, codegen: &Codegen) -> TokenStream {
205205 }
206206 }
207207
208- self . convert_offset( & mut it . span. end) ;
208+ self . convert_offset( & mut specifier . span. end) ;
209209 }
210210
211211 ///@@line_break
212- fn visit_import_specifier( & mut self , it : & mut ImportSpecifier <' a>) {
213- self . convert_offset( & mut it . span. start) ;
212+ fn visit_import_specifier( & mut self , specifier : & mut ImportSpecifier <' a>) {
213+ self . convert_offset( & mut specifier . span. start) ;
214214
215215 // `imported` and `local` have same span if e.g. `import {x} from 'foo';`
216- match & mut it . imported {
217- ModuleExportName :: IdentifierName ( imported) if imported. span == it . local. span => {
216+ match & mut specifier . imported {
217+ ModuleExportName :: IdentifierName ( imported) if imported. span == specifier . local. span => {
218218 self . visit_identifier_name( imported) ;
219- it . local. span = imported. span;
219+ specifier . local. span = imported. span;
220220 }
221221 imported => {
222222 self . visit_module_export_name( imported) ;
223- self . visit_binding_identifier( & mut it . local) ;
223+ self . visit_binding_identifier( & mut specifier . local) ;
224224 }
225225 }
226226
227- self . convert_offset( & mut it . span. end) ;
227+ self . convert_offset( & mut specifier . span. end) ;
228228 }
229229
230230 ///@@line_break
231- fn visit_with_clause( & mut self , it : & mut WithClause <' a>) {
231+ fn visit_with_clause( & mut self , with_clause : & mut WithClause <' a>) {
232232 // `WithClause::attributes_keyword` has a span before start of the `WithClause`.
233233 // ESTree does not include that node, nor the span of the `WithClause` itself,
234234 // so skip processing those spans.
235- self . visit_import_attributes( & mut it . with_entries) ;
235+ self . visit_import_attributes( & mut with_clause . with_entries) ;
236236 }
237237
238238 ///@@line_break
239- fn visit_template_literal( & mut self , it : & mut TemplateLiteral <' a>) {
240- self . convert_offset( & mut it . span. start) ;
239+ fn visit_template_literal( & mut self , lit : & mut TemplateLiteral <' a>) {
240+ self . convert_offset( & mut lit . span. start) ;
241241
242242 // Visit `quasis` and `expressions` in source order. The two `Vec`s are interleaved.
243- for ( quasi, expression) in it . quasis. iter_mut( ) . zip( & mut it . expressions) {
243+ for ( quasi, expression) in lit . quasis. iter_mut( ) . zip( & mut lit . expressions) {
244244 self . visit_template_element( quasi) ;
245245 self . visit_expression( expression) ;
246246 }
247- self . visit_template_element( it . quasis. last_mut( ) . unwrap( ) ) ;
247+ self . visit_template_element( lit . quasis. last_mut( ) . unwrap( ) ) ;
248248
249- self . convert_offset( & mut it . span. end) ;
249+ self . convert_offset( & mut lit . span. end) ;
250250 }
251251 }
252252
0 commit comments