From e1f79a06b2d01e926c3091c80c156285c74d39b5 Mon Sep 17 00:00:00 2001 From: filt3rek Date: Mon, 24 Oct 2022 18:27:44 +0200 Subject: [PATCH] HScript parser added to try catch --- ftk/format/template/Interp.hx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ftk/format/template/Interp.hx b/ftk/format/template/Interp.hx index 73b0982..82b6b47 100644 --- a/ftk/format/template/Interp.hx +++ b/ftk/format/template/Interp.hx @@ -156,11 +156,11 @@ class Interp { hinterp.variables.set( field, Reflect.field( ctx, field ) ); } - var expr = new hscript.Parser().parseString( hscriptSource ); - if( runtimePos ){ - addSources( expr, hscriptSource ); - } try{ + var expr = new hscript.Parser().parseString( hscriptSource ); + if( runtimePos ){ + addSources( expr, hscriptSource ); + } if( !isInclusion ){ return hinterp.execute( expr ); }else{