diff --git a/ftk/format/template/Interp.hx b/ftk/format/template/Interp.hx index 82b6b47..a231dfa 100644 --- a/ftk/format/template/Interp.hx +++ b/ftk/format/template/Interp.hx @@ -155,7 +155,6 @@ class Interp { for( field in Reflect.fields( ctx ) ){ hinterp.variables.set( field, Reflect.field( ctx, field ) ); } - try{ var expr = new hscript.Parser().parseString( hscriptSource ); if( runtimePos ){ diff --git a/ftk/format/template/Parser.hx b/ftk/format/template/Parser.hx index 9b49756..5e55f8d 100644 --- a/ftk/format/template/Parser.hx +++ b/ftk/format/template/Parser.hx @@ -168,7 +168,8 @@ class Parser{ if( isInComment ){ addComment( DO + s ); }else{ - out += '$s;'; + out += '$s'; + if( !s.trim().endsWith( ";" ) ) out+= ";"; } case EElse : if( isInComment ){