parseOn method
Parses the given context.
Overridden in concrete subclasses to implement the parser-specific logic.
Takes a parse context and returns the resulting context, which is either
a Success or Failure context.
Implementation
@override
@noBoundsChecks
Result<String> parseOn(Context context) {
final buffer = context.buffer;
final position = context.position;
if (buffer.startsWith(literal, position)) {
return context.success(literal, position + literal.length);
}
return context.failure(message);
}