I only noticed now that the switch to menhir in #1705 completely broke the implementation of source locations for the AST – they are all empty, producing useless messages for type or runtime errors.
The current implementation depends on reading out Parsing.symbol_start/end_pos, which are defunct with menhir.
Unfortunately, menhir offers no easy substitute – afaict we'll need to change every single rule to use $sloc and $loc($i). Or revert #1705.
I only noticed now that the switch to menhir in #1705 completely broke the implementation of source locations for the AST – they are all empty, producing useless messages for type or runtime errors.
The current implementation depends on reading out Parsing.symbol_start/end_pos, which are defunct with menhir.
Unfortunately, menhir offers no easy substitute – afaict we'll need to change every single rule to use
$sloc
and$loc($i)
. Or revert #1705.@zapashcanon, can you please look into this?