Commit Graph

6 Commits

Author SHA1 Message Date
Louis Gesbert
4acf321309 C backend: make error raising more concise 2024-05-30 16:59:55 +02:00
Louis Gesbert
9d07015864 Unify runtime error handling
- Clearly distinguish Exceptions from Errors. The only catchable exception
  available in our AST is `EmptyError`, so the corresponding nodes are made less
  generic, and a node `FatalError` is added

- Runtime errors are defined as a specific type in the OCaml runtime, with a
  carrier exception and printing functions. These are used throughout, and
  consistently by the interpreter. They always carry a position, that can be
  converted to be printed with the fancy compiler location printer, or in a
  simpler way from the backends.

- All operators that might be subject to an error take a position as argument,
  in order to print an informative message without relying on backtraces from
  the backend
2024-04-26 18:31:26 +02:00
Denis Merigoux
b48fb0e223
Array compilation to C is OK 2024-01-26 20:15:32 +01:00
Denis Merigoux
8a139f6a3c
Work on arrays 2024-01-22 16:49:58 +01:00
Denis Merigoux
fe5b842a03
Simple example compiles and runs fine 2023-12-13 16:58:02 +01:00
Denis Merigoux
d88f67bb2c
Progress 2023-12-12 16:08:40 +01:00