From bd2f7bd0df4dfad37b6b2c9ae23c871ea29954b3 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 3 Apr 2018 11:32:19 -0400 Subject: [PATCH] Allow strict resolution --- build_jael/lib/build_jael.dart | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/build_jael/lib/build_jael.dart b/build_jael/lib/build_jael.dart index 49003625..0e93052e 100644 --- a/build_jael/lib/build_jael.dart +++ b/build_jael/lib/build_jael.dart @@ -49,11 +49,24 @@ class JaelBuilder implements Builder { if (errors.isNotEmpty) { jael.Renderer.errorDocument(errors, buf); - return; - } + } else { + var scope = new SymbolTable(values: new Map.from(options.config)); - var scope = new SymbolTable(values: new Map.from(options.config)); - const jael.Renderer().render(doc, buf, scope); + try { + const jael.Renderer().render( + doc, + buf, + scope, + strictResolution: options.config['strict'] == true, + ); + } on jael.JaelError catch (e) { + errors.add(e); + } + + if (errors.isNotEmpty) { + jael.Renderer.errorDocument(errors, buf); + } + } buildStep.writeAsString( buildStep.inputId.changeExtension('.html'),