result method
Implementation
StubbleResult result(StubbleContext context) {
if (!context.callable(helper)) {
return StubbleResult(
err: StubbleError(
code: errorHelperUnregistered,
text: 'Helper "$helper" is unregistered',
),
);
}
final result = StubbleResult();
try {
if (_attributes.isEmpty) {
_attributes.add(context.data);
}
result.result = context.call(helper, _attributes, context.compile(_body));
result.pop = true;
} catch (e) {
result.err = StubbleError(
text: 'Helper "$helper" error: ${e.toString()}',
code: errorCallingHelper,
);
}
return result;
}