Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion polymod/hscript/_internal/PolymodClassDeclEx.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package polymod.hscript._internal;

#if hscript
import hscript.Expr.ClassDecl;
import hscript.Expr.FieldDecl;
import polymod.hscript._internal.PolymodScriptClass;
Expand Down Expand Up @@ -30,4 +31,4 @@ typedef PolymodClassImport = {
@:optional var cls:Class<Dynamic>;
@:optional var enm:Enum<Dynamic>;
}

#end
2 changes: 2 additions & 0 deletions polymod/hscript/_internal/PolymodExprEx.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package polymod.hscript._internal;

#if hscript
#if hscriptPos
class ErrorEx
{
Expand Down Expand Up @@ -132,3 +133,4 @@ ECustom(msg:String);
throw "Unimplemented error type " + err;
}
}
#end
2 changes: 2 additions & 0 deletions polymod/hscript/_internal/PolymodPrinterEx.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package polymod.hscript._internal;

#if hscript
import hscript.Printer;

class PolymodPrinterEx extends Printer
Expand Down Expand Up @@ -37,3 +38,4 @@ class PolymodPrinterEx extends Printer
#end
}
}
#end
2 changes: 2 additions & 0 deletions polymod/hscript/_internal/PolymodScriptClass.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package polymod.hscript._internal;

#if hscript
import hscript.Expr;
import polymod.hscript._internal.PolymodExprEx;

Expand Down Expand Up @@ -558,3 +559,4 @@ class PolymodScriptClass
}
#end
}
#end
6 changes: 2 additions & 4 deletions polymod/hscript/_internal/PolymodScriptMacro.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package polymod.hscript._internal;

#if hscript
import EReg;
import haxe.macro.Context;
import haxe.macro.Expr;
Expand Down Expand Up @@ -84,10 +85,6 @@ class PolymodScriptMacro
static var scriptOverrides:Array<Expr> = [];
public static function buildScriptImpls(?filters:Array<String>):Void
{
#if !hscript
return;
#end

// if no filters are given
// create a scripted implementation
// for every class
Expand Down Expand Up @@ -588,3 +585,4 @@ class PolymodScriptMacro
return scriptOverrides;
}
}
#end
6 changes: 5 additions & 1 deletion polymod/hscript/_internal/PolymodScriptManager.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package polymod.hscript._internal;

#if hscript
import hscript.Expr;
import polymod.hscript._internal.PolymodClassDeclEx;

Expand Down Expand Up @@ -102,6 +103,7 @@ class PolymodScriptManager
}
}

#if lime
public function registerScriptClassByPathAsync(path:String):lime.app.Future<Bool>
{
var promise = new lime.app.Promise<Bool>();
Expand Down Expand Up @@ -154,6 +156,7 @@ class PolymodScriptManager
// Await the promise
return promise.future;
}
#end

public function validateImports():Void
{
Expand Down Expand Up @@ -547,4 +550,5 @@ class PolymodScriptManager
return staticCallFunction(path, fnName, [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7]);
}
#end
}
}
#end