diff --git a/Test.hx b/Test.hx index db7e585..48e6fa0 100644 --- a/Test.hx +++ b/Test.hx @@ -1,3 +1,5 @@ +import hscript.Macro; + class Test { static function test(x,v:Dynamic,?vars : Dynamic) { diff --git a/hscript/Macro.hx b/hscript/Macro.hx index c072bde..a2b59e9 100644 --- a/hscript/Macro.hx +++ b/hscript/Macro.hx @@ -227,6 +227,8 @@ class Macro { EObjectDecl(tf); case ETernary(cond, e1, e2): ETernary(convert(cond), convert(e1), convert(e2)); + case ESwitch(e, cases, edef): + ESwitch(convert(e), [for( c in cases ) { values : [for( v in c.values ) convert(v)], expr : convert(c.expr) } ], edef == null ? null : convert(edef)); }, pos : #if hscriptPos { file : p.file, min : e.pmin, max : e.pmax } #else p #end } }