points by vinipsmaker 4 days ago | 0 comments
You need to forbid stuff such as:
return return 1;
return itself isn't an expression (it's a statement) so it can't be used in places that expect expressions (such as the "argument" to return itself).However extending Pratt parsing to handle this case is trivial: https://vinipsmaker.github.io/blog/article/statements-in-pra...
It's still an extension so not really pure Pratt parsing IMO (other practitioners of Pratt parsing disagree with me).
Aún no hay comentarios.