Open aryx opened 7 months ago
cc @mjambon
it was because of the ?type: string option
still, a better error message would be nice.
Low priority.
This happens because type
is a keyword. I think it's a matter of adding a case for handling the error in the menhir file. Here's a minimal atd file with this error:
$ cat bug.atd
type t = { type: string }
$ atdgen bug.atd
Fatal error: exception Atd.Parser.MenhirBasics.Error
(btw, I don't know why I'm not getting a stack trace. I'm using atdgen 2.11.0 as shipped by opam 2.1.0 with ocaml 4.14.0)
With this file:
atdgen rule_schema_v2.atd generates:
instead of a clear parsing error.