File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ enum Error {
122
122
enum ModuleDecl {
123
123
DPackage ( path : Array <String > );
124
124
DImport ( path : Array <String >, ? everything : Bool , ? name : String );
125
+ DUsing ( path : Array <String > );
125
126
DClass ( c : ClassDecl );
126
127
DTypedef ( c : TypeDecl );
127
128
DEnum ( e : EnumDecl );
Original file line number Diff line number Diff line change @@ -1194,6 +1194,24 @@ class Parser {
1194
1194
}
1195
1195
ensure (TSemicolon );
1196
1196
return DImport (path , star , name );
1197
+ case " using" :
1198
+ var path = [getIdent ()];
1199
+ while ( true ) {
1200
+ var t = token ();
1201
+ if ( t != TDot ) {
1202
+ push (t );
1203
+ break ;
1204
+ }
1205
+ t = token ();
1206
+ switch ( t ) {
1207
+ case TId (id ):
1208
+ path .push (id );
1209
+ default :
1210
+ unexpected (t );
1211
+ }
1212
+ }
1213
+ ensure (TSemicolon );
1214
+ return DUsing (path );
1197
1215
case " class" :
1198
1216
var name = getIdent ();
1199
1217
var params = parseParams ();
You can’t perform that action at this time.
0 commit comments