Commit 87462fd 1 parent 1cc43f7 commit 87462fd Copy full SHA for 87462fd
File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,11 @@ impl<'a> ParserImpl<'a> {
33
33
}
34
34
}
35
35
36
- pub ( crate ) fn parse_using ( & mut self ) -> Result < Statement < ' a > > {
37
- let using_decl = self . parse_using_declaration ( StatementContext :: StatementList ) ?;
38
-
36
+ pub ( crate ) fn parse_using_statement ( & mut self ) -> Result < Statement < ' a > > {
37
+ let mut decl = self . parse_using_declaration ( StatementContext :: StatementList ) ?;
39
38
self . asi ( ) ?;
40
-
41
- Ok ( Statement :: VariableDeclaration ( self . alloc ( using_decl ) ) )
39
+ decl . span = self . end_span ( decl . span ) ;
40
+ Ok ( Statement :: VariableDeclaration ( self . alloc ( decl ) ) )
42
41
}
43
42
44
43
pub ( crate ) fn parse_variable_declaration (
Original file line number Diff line number Diff line change @@ -123,9 +123,9 @@ impl<'a> ParserImpl<'a> {
123
123
Kind :: Await
124
124
if self . peek_kind ( ) == Kind :: Using && self . nth_kind ( 2 ) . is_binding_identifier ( ) =>
125
125
{
126
- self . parse_using ( )
126
+ self . parse_using_statement ( )
127
127
}
128
- Kind :: Using if self . peek_kind ( ) . is_binding_identifier ( ) => self . parse_using ( ) ,
128
+ Kind :: Using if self . peek_kind ( ) . is_binding_identifier ( ) => self . parse_using_statement ( ) ,
129
129
Kind :: Async if self . peek_at ( Kind :: Function ) && !self . peek_token ( ) . is_on_new_line => {
130
130
self . parse_function_declaration ( stmt_ctx)
131
131
}
You can’t perform that action at this time.
0 commit comments