Closed xDGameStudios closed 4 years ago
private static TokenListParser<T, Token<T>> PassThrough<T>(Token<T> empty)
{
return input =>
{
var output = input.ConsumeToken();
return TokenListParserResult.Value(empty, output.Location, output.Location);
};
}
this seems to do the trick!! Don't know if there is a better way ;)
I'm trying to create a dummy parser that doesn't consume tokens and I don't know how this can be done! Is it even possible? That returns a given argument...
Token.PassThrough(Token.Empty)