gator icon indicating copy to clipboard operation
gator copied to clipboard

Improve error handling ⚠️

Open euisuny opened this issue 7 years ago • 1 comments
trafficstars

A few things that could be introduced for improved error handling:

  • [x] Line number printing in type checker 🔢
  • [x] Improve line number/character printing in parser (currently has a few bugs) 🐛
  • [ ] Detailed error types (rather than generic TypeCheckException) 🍡
  • [ ] Error formatting (i.e. write a error formatter) 🗒
  • [ ] Introduce flags for outputting compiler warnings that are not exceptions/errors 🎏

euisuny avatar Oct 28 '18 15:10 euisuny

Nice! Here's one small tip: I had to sort out the "modern way" to do line/column number reporting for ocamllex/ocamlyacc for the latest 4110 assignment. Perhaps this will be relevant to our Menhir-based parser too. Here are the relevant lines:

https://github.com/cs4110/2018fa/blob/b63ceffb3512221dacaa4aa9b1bb695104c465a5/homework/homework07code/lexer.mll#L15

https://github.com/cs4110/2018fa/blob/b63ceffb3512221dacaa4aa9b1bb695104c465a5/homework/homework07code/main.ml#L28-L29

sampsyo avatar Oct 28 '18 16:10 sampsyo