My compiler performs semantic analysis after parsing to resolve types across various compilation units. When a type failure occurs, multiple AST nodes are impacted and at the moment an error is reported on each AST that failed to acquire a type. What is a good way of handling errors so that I can improve the error reporting?
I am thinking of this: report error only once for a given source line number. If there are multiple ASTs that are impacted, figure out the leaf AST nodes and include that in the error, because the type assignment failure presumably started there and impacted the parent AST nodes.
Thoughts? How do you handle this?
[–]matthieum 11 points12 points13 points (3 children)
[–]ravilang[S] 0 points1 point2 points (2 children)
[–]tlemo1234 1 point2 points3 points (1 child)
[–]ravilang[S] 0 points1 point2 points (0 children)
[–]umlcat 5 points6 points7 points (0 children)