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 {
121
121
122
122
enum ModuleDecl {
123
123
DPackage ( path : Array <String > );
124
- DImport ( path : Array <String >, ? everything : Bool );
124
+ DImport ( path : Array <String >, ? everything : Bool , ? name : String );
125
125
DClass ( c : ClassDecl );
126
126
DTypedef ( c : TypeDecl );
127
127
}
Original file line number Diff line number Diff line change @@ -1170,8 +1170,18 @@ class Parser {
1170
1170
unexpected (t );
1171
1171
}
1172
1172
}
1173
+ var name = null ;
1174
+ if ( maybe (TId (" as" )) && ! star ) {
1175
+ var t = token ();
1176
+ switch ( t ) {
1177
+ case TId (id ):
1178
+ name = id ;
1179
+ default :
1180
+ unexpected (t );
1181
+ }
1182
+ }
1173
1183
ensure (TSemicolon );
1174
- return DImport (path , star );
1184
+ return DImport (path , star , name );
1175
1185
case " class" :
1176
1186
var name = getIdent ();
1177
1187
var params = parseParams ();
You can’t perform that action at this time.
0 commit comments