missingTagStartParser function
Adds an error if a Tag end is found but not a Tag start. It replaces the Tag end to a String e.g. containing: }}
Implementation
Parser<String> missingTagStartParser(ParserContext parserContext) =>
string(parserContext.engine.tagEnd).valueContextMap((value, context) {
parserContext.errors.add(
ParseError(
message:
'Found tag end: ${parserContext.engine.tagEnd}, '
'but it was not preceded with a tag start: '
'${parserContext.engine.tagStart}',
position: context.toPositionString(),
),
);
return value;
});