Skip to content
Open
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
5 changes: 5 additions & 0 deletions hscript/Async.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hscript;

#if POLYMOD_REDIRECT_HSCRIPT
typedef Async = polymod.hscript._internal.Async;
#end
5 changes: 5 additions & 0 deletions hscript/Checker.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hscript;

#if POLYMOD_REDIRECT_HSCRIPT
typedef Checker = polymod.hscript._internal.Checker;
#end
8 changes: 8 additions & 0 deletions hscript/Expr.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package hscript;

#if POLYMOD_REDIRECT_HSCRIPT
typedef Expr = polymod.hscript._internal.Expr;
typedef ExprDef = polymod.hscript._internal.Expr.ExprDef;
typedef Error = polymod.hscript._internal.Expr.Error;
typedef ErrorDef = polymod.hscript._internal.Expr.ErrorDef;
#end
5 changes: 5 additions & 0 deletions hscript/Interp.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hscript;

#if POLYMOD_REDIRECT_HSCRIPT
typedef Interp = polymod.hscript._internal.Interp;
#end
5 changes: 5 additions & 0 deletions hscript/Parser.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hscript;

#if POLYMOD_REDIRECT_HSCRIPT
typedef Parser = polymod.hscript._internal.Parser;
#end
5 changes: 5 additions & 0 deletions hscript/Printer.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hscript;

#if POLYMOD_REDIRECT_HSCRIPT
typedef Printer = polymod.hscript._internal.Printer;
#end
9 changes: 9 additions & 0 deletions hscript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## What are these?

These files mean to redirect imports of HScript modules to Polymod ones, so that projects which depend on HScript don't have to keep an extra library lying around.
Keep in mind that compatibility with existing code is not guaranteed due to Polymod-specific changes.

## How to use them?

Simply add the `POLYMOD_REDIRECT_HSCRIPT` define to your project. You should be able to import the typedefs.
Do note that not all types are available, only essential ones.
5 changes: 5 additions & 0 deletions hscript/Tools.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hscript;

#if POLYMOD_REDIRECT_HSCRIPT
typedef Tools = polymod.hscript._internal.Tools;
#end
5 changes: 4 additions & 1 deletion include.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<project>
<!-- These values are added to the project XML when you include this library. -->
<haxelib name="thx.semver" />
<!-- <haxelib name="hscript" /> This library is now OPTIONAL. -->
<section if="POLYMOD_REDIRECT_HSCRIPT" unless="hscript">
<!-- We pretend that WE are hscript. -->
<haxedef name="hscript" />
</section>
<!--
<haxeflag name="- -macro" value="polymod.hscript._internal.PolymodFinalMacro.locateAllFinals()" />
-->
Expand Down