buildBody method
Builds a parser function body and returns the source code of the function body.
Implementation
@override
BuildBodyResult buildBody(BuildContext context, bool hasResult) {
RangeError.checkValidRange(0, char, 0x10ffff, 'char');
final reader = getCharReader(char <= 0xffff, 'c');
return renderBody(
this,
context,
hasResult,
_template,
_templateNoResult,
{
'char': getAsCode(char),
'read': reader.name,
'size': getAsCode(char < 0xffff ? 1 : 2),
},
);
}