File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ grammar =
364
364
ImportSpecifier : [
365
365
o ' Identifier'
366
366
o ' Identifier IMPORT_AS Identifier' , -> new ImportSpecifier $1, $3
367
- o ' * IMPORT_AS Identifier' , -> new ImportSpecifier { value : ' * ' } , $3
367
+ o ' IMPORT_ALL IMPORT_AS Identifier' , -> new ImportSpecifier null , $3
368
368
]
369
369
370
370
NamedImports : [
Original file line number Diff line number Diff line change @@ -448,6 +448,8 @@ exports.Lexer = class Lexer
448
448
if value is ' ;'
449
449
@seenFor = @seenImport = @seenExport = no
450
450
tag = ' TERMINATOR'
451
+ else if value is ' *' and (@seenImport or @seenExport )
452
+ tag = ' IMPORT_ALL'
451
453
else if value in MATH then tag = ' MATH'
452
454
else if value in COMPARE then tag = ' COMPARE'
453
455
else if value in COMPOUND_ASSIGN then tag = ' COMPOUND_ASSIGN'
Original file line number Diff line number Diff line change @@ -1285,7 +1285,7 @@ exports.ImportSpecifier = class ImportSpecifier extends Base
1285
1285
children : [' original' , ' alias' ]
1286
1286
1287
1287
compileNode : (o ) ->
1288
- return [@ makeCode (" #{ @original .value } as #{ @alias .value } " )]
1288
+ return [@ makeCode (" #{ if @original ? then @original .value else ' * ' } as #{ @alias .value } " )]
1289
1289
1290
1290
# ### Assign
1291
1291
You can’t perform that action at this time.
0 commit comments