File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -377,14 +377,14 @@ impl<'a> ParserImpl<'a> {
377377 let modifiers = self . parse_modifiers ( false , false ) ;
378378 let class_decl = self . parse_class_declaration ( class_span, & modifiers, decorators) ;
379379 let decl = Declaration :: ClassDeclaration ( class_decl) ;
380- ModuleDeclaration :: ExportNamedDeclaration ( self . ast . alloc_export_named_declaration (
380+ self . ast . module_declaration_export_named_declaration (
381381 self . end_span ( span) ,
382382 Some ( decl) ,
383383 self . ast . vec ( ) ,
384384 None ,
385385 ImportOrExportKind :: Value ,
386386 NONE ,
387- ) )
387+ )
388388 }
389389 Kind :: Eq if self . is_ts => ModuleDeclaration :: TSExportAssignment (
390390 self . parse_ts_export_assignment_declaration ( span) ,
Original file line number Diff line number Diff line change @@ -140,14 +140,12 @@ impl<'a> ParserImpl<'a> {
140140 self . bump_any ( ) ;
141141 if self . at ( Kind :: Dot ) {
142142 // `type something = intrinsic. ...`
143- let intrinsic_ident = self . ast . alloc_identifier_reference (
143+ let left_name = self . ast . ts_type_name_identifier_reference (
144144 intrinsic_token. span ( ) ,
145145 self . token_source ( & intrinsic_token) ,
146146 ) ;
147- let type_name = self . parse_ts_qualified_type_name (
148- intrinsic_token. start ( ) ,
149- TSTypeName :: IdentifierReference ( intrinsic_ident) ,
150- ) ;
147+ let type_name =
148+ self . parse_ts_qualified_type_name ( intrinsic_token. start ( ) , left_name) ;
151149 let type_parameters = self . parse_type_arguments_of_type_reference ( ) ;
152150 self . ast . ts_type_type_reference (
153151 self . end_span ( intrinsic_token. start ( ) ) ,
Original file line number Diff line number Diff line change @@ -788,12 +788,10 @@ impl<'a> ParserImpl<'a> {
788788 let span = self . start_span ( ) ;
789789 let left = if self . at ( Kind :: This ) {
790790 self . bump_any ( ) ;
791- let this_expr = self . ast . alloc_this_expression ( self . end_span ( span) ) ;
792- TSTypeName :: ThisExpression ( this_expr)
791+ self . ast . ts_type_name_this_expression ( self . end_span ( span) )
793792 } else {
794793 let ident = self . parse_identifier_name ( ) ;
795- let ident = self . ast . alloc_identifier_reference ( ident. span , ident. name ) ;
796- TSTypeName :: IdentifierReference ( ident)
794+ self . ast . ts_type_name_identifier_reference ( ident. span , ident. name )
797795 } ;
798796 if self . at ( Kind :: Dot ) { self . parse_ts_qualified_type_name ( span, left) } else { left }
799797 }
You can’t perform that action at this time.
0 commit comments