Oops
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ enum Expr
|
||||
EMeta( name : String, args : Array<Expr>, e : Expr );
|
||||
ECheckType( e : Expr, t : CType );
|
||||
|
||||
EImport( c : String, ?asname:String );
|
||||
EImport( c : String, ?as:String, ?f:String );
|
||||
EClass( name:String, fields:Array<Expr>, ?extend:String, interfaces:Array<String> );
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -172,7 +172,7 @@ class Parser {
|
||||
#end
|
||||
}
|
||||
|
||||
public inline function error( err: Error, pmin: Int, pmax: Int ) {
|
||||
public inline function error( err: #if hscriptPos Error.ErrorDef #else Error #end, pmin: Int, pmax: Int ) {
|
||||
if( !resumeErrors )
|
||||
#if hscriptPos
|
||||
throw new Error(err, pmin, pmax, origin, line);
|
||||
@@ -1069,7 +1069,7 @@ class Parser {
|
||||
}
|
||||
case TId(id):
|
||||
var path = [id];
|
||||
var asname:String = null;
|
||||
var as:String = null;
|
||||
var t = null;
|
||||
while( true ) {
|
||||
t = token();
|
||||
@@ -1078,7 +1078,7 @@ class Parser {
|
||||
t = token();
|
||||
switch( t ) {
|
||||
case TId(id):
|
||||
asname = id;
|
||||
as = id;
|
||||
default:
|
||||
unexpected(t);
|
||||
}
|
||||
@@ -1099,7 +1099,7 @@ class Parser {
|
||||
ensure(TSemicolon);
|
||||
push(TSemicolon);
|
||||
var p = path.join(".");
|
||||
mk(EImport(p, asname),p1);
|
||||
mk(EImport(p, as),p1);
|
||||
default:
|
||||
unexpected(tk);
|
||||
null;
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ class Tools {
|
||||
case ESwitch(e, cases, def): ESwitch(f(e), [for( c in cases ) new SwitchCase([for( v in c.values ) f(v)], f(c.expr))], def == null ? null : f(def));
|
||||
case EMeta(name, args, e): EMeta(name, args == null ? null : [for( a in args ) f(a)], f(e));
|
||||
case ECheckType(e,t): ECheckType(f(e), t);
|
||||
case EImport(c, as): EImport(c, as);
|
||||
case EImport(c, as, f): EImport(c, as, f);
|
||||
case EClass(name, el, extend, interfaces): EClass(name, [for( e in el ) f(e)], extend, interfaces);
|
||||
}
|
||||
return mk(edef, e);
|
||||
|
||||
Reference in New Issue
Block a user