2 ms·
Parser combinations are very powerful! For example your function whitespace_tokens could be something like: whitespace_tokens = many1(choice(‘ ‘, ‘\t’, ‘\n’)).
by ahoka 3y ago
Parser combinations are very powerful! For example your function whitespace_tokens could be something like:
whitespace_tokens = many1(choice(‘ ‘, ‘\t’, ‘\n’)).map(m -> token(m))