NathanReb / ppx_yojson

OCaml PPX extension for JSON literals and patterns
BSD 2-Clause "Simplified" License
42 stars 5 forks source link

Embed errors in AST instead of raising exceptions #44

Open NathanReb opened 1 year ago

NathanReb commented 1 year ago

This replaces uses of Location.raise_errorf by generating an ocaml.error extension node and inserting it into the generated AST.

This allows the ppx to process all extension nodes and to produce all errors in a single run so that they can all be reported by merlin in the editor.