Allow strict resolution

This commit is contained in:
Tobe O 2018-04-03 11:32:19 -04:00
parent f8fd0e0a0a
commit bd2f7bd0df

View file

@ -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));
try {
const jael.Renderer().render(
doc,
buf,
scope,
strictResolution: options.config['strict'] == true,
);
} on jael.JaelError catch (e) {
errors.add(e);
}
var scope = new SymbolTable(values: new Map.from(options.config));
const jael.Renderer().render(doc, buf, scope);
if (errors.isNotEmpty) {
jael.Renderer.errorDocument(errors, buf);
}
}
buildStep.writeAsString(
buildStep.inputId.changeExtension('.html'),