You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then I have to give it a Lexing.lexbuf instance with Location.input_buf := ...
It'd be nice if Sedlex had buffer conversion out of the box to support this.
As it is now, I can't even create a Lexing.lexbuf myself out of a Sedlexing.lexbuf because I don't have access to the buffer's actual contents. All I can get are locations. And small bits of the contents through the lexeme functions
The text was updated successfully, but these errors were encountered:
Ocaml's own compiler libraries provide cool ways to highlight source code and display syntax errors, through
Location.print_report
.I managed to use it to display Menhir's messages with the location:
But if I want it to have source highlighting like so:
then I have to give it a
Lexing.lexbuf
instance withLocation.input_buf := ...
It'd be nice if Sedlex had buffer conversion out of the box to support this.
As it is now, I can't even create a
Lexing.lexbuf
myself out of aSedlexing.lexbuf
because I don't have access to the buffer's actual contents. All I can get are locations. And small bits of the contents through thelexeme
functionsThe text was updated successfully, but these errors were encountered: