buildBody method
Builds a parser function body and returns the source code of the function body.
Implementation
@override
BuildBodyResult buildBody(BuildContext context, bool hasResult) {
final body = p.buildBody(context, hasResult);
final source = body.source;
final buffer = StringBuffer();
buffer.writeln(' // => $name');
buffer.writeln(source);
buffer.write(' // <= $name');
return BuildBodyResult(
result: body.result,
source: buffer.toString(),
);
}