diff --git a/hscript/Interp.hx b/hscript/Interp.hx index b1b6cb3..ffc9029 100644 --- a/hscript/Interp.hx +++ b/hscript/Interp.hx @@ -542,6 +542,10 @@ class Interp { return expr(e); case ECheckType(e,_): return expr(e); + #if hscript_extraExprs + default: + throw '$e is unknown'; + #end } return null; } diff --git a/hscript/Printer.hx b/hscript/Printer.hx index b6310a8..035fa8e 100644 --- a/hscript/Printer.hx +++ b/hscript/Printer.hx @@ -332,6 +332,10 @@ class Printer { add(" : "); addType(t); add(")"); + #if hscript_extraExprs + default: + throw '${#if hscriptPos e.e #else e #end} is unknown'; + #end } } diff --git a/hscript/Tools.hx b/hscript/Tools.hx index 2153d3f..cecf7db 100644 --- a/hscript/Tools.hx +++ b/hscript/Tools.hx @@ -58,6 +58,10 @@ class Tools { if( def != null ) f(def); case EMeta(name, args, e): if( args != null ) for( a in args ) f(a); f(e); case ECheckType(e,_): f(e); + #if hscript_extraExprs + default: + throw '${expr(e)} is unknown'; + #end } } @@ -88,6 +92,7 @@ class Tools { case ESwitch(e, cases, def): ESwitch(f(e), [for( c in cases ) { values : [for( v in c.values ) f(v)], expr : 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); + default: null; } return mk(edef, e); }