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 @@ -122,7 +122,7 @@ enum Error {
122
122
123
123
enum ModuleDecl {
124
124
DPackage ( path : Array <String > );
125
- DImport ( path : Array <String >, ? everything : Bool );
125
+ DImport ( path : Array <String >, ? everything : Bool , ? name : String );
126
126
DClass ( c : ClassDecl );
127
127
DTypedef ( c : TypeDecl );
128
128
}
Original file line number Diff line number Diff line change @@ -1149,8 +1149,18 @@ class Parser {
1149
1149
unexpected (t );
1150
1150
}
1151
1151
}
1152
+ var name = null ;
1153
+ if ( maybe (TId (" as" )) && ! star ) {
1154
+ var t = token ();
1155
+ switch ( t ) {
1156
+ case TId (id ):
1157
+ name = id ;
1158
+ default :
1159
+ unexpected (t );
1160
+ }
1161
+ }
1152
1162
ensure (TSemicolon );
1153
- return DImport (path , star );
1163
+ return DImport (path , star , name );
1154
1164
case " class" :
1155
1165
var name = getIdent ();
1156
1166
var params = parseParams ();
You can’t perform that action at this time.
0 commit comments