File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ enum Error {
121121
122122enum ModuleDecl {
123123 DPackage ( path : Array <String > );
124- DImport ( path : Array <String >, ? everything : Bool );
124+ DImport ( path : Array <String >, ? everything : Bool , ? name : String );
125125 DClass ( c : ClassDecl );
126126 DTypedef ( c : TypeDecl );
127127}
Original file line number Diff line number Diff line change @@ -1169,8 +1169,18 @@ class Parser {
11691169 unexpected (t );
11701170 }
11711171 }
1172+ var name = null ;
1173+ if ( maybe (TId (" as" )) && ! star ) {
1174+ var t = token ();
1175+ switch ( t ) {
1176+ case TId (id ):
1177+ name = id ;
1178+ default :
1179+ unexpected (t );
1180+ }
1181+ }
11721182 ensure (TSemicolon );
1173- return DImport (path , star );
1183+ return DImport (path , star , name );
11741184 case " class" :
11751185 var name = getIdent ();
11761186 var params = parseParams ();
You can’t perform that action at this time.
0 commit comments