Compiling the grammar into the host-language should not introduce error. However we want to keep the middle phase agnostic to the host-language.
In the case of function call, if an expression has an incompatible type, there will be a type mismatch. We think that errors generated by the host-language compiler (Rust) will be harder to analyse, that's why we would like the PEG compiler to handle this case and to output better error message.
I am not agree anymore. I think the error generated by the Rust compiler will be easy to understand as the name of the semantic action will be the same (as the one appearing in the grammar).
Compiling the grammar into the host-language should not introduce error. However we want to keep the middle phase agnostic to the host-language.
In the case of function call, if an expression has an incompatible type, there will be a type mismatch. We think that errors generated by the host-language compiler (Rust) will be harder to analyse, that's why we would like the PEG compiler to handle this case and to output better error message.