Closed johnperry-math closed 5 years ago
Given the goal of this project is to showcase Niklaus Wirth's approach to writing compilers, I'll rather keep the original error message, so that we don't diverge from the Oberon-07 compiler for RISC. I am still OK with small improvements in the error messages that reword obscure errors.
OK, I'm glad I asked. I found these more helpful for me (guessing which variable is causing the problem is sometimes a pain) but I can keep this local to my fork.
I mentioned I would make some suggestions for more helpful error messages. That could be subjective, so I wanted to make sure the following general approach would be OK with you. After all, I don't want to get so far into this that it becomes too hard to undo.
Suppose someone tries to cast two types that don't belong together. Right now the error will be
incompatible types
or something like that. I thought it might be more helpful to name the types, which leads to the following changes toTypeTest
:Does this sort of thing look OK to you, or would you suggest a different way of going about it?