New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wish: empty_lexbuf in Lexing #8234
Comments
Comment author: administrator
Hello, We can indeed move empty_lexbuf from toploop.ml to --Luc |
Comment author: administrator Hello,
I have implemented your suggestion, but I renamed the function to -- Damien |
Comment author: administrator
Luc Maranget wrote:
I agree. My point was that:
Damien Doligez wrote:
Fine. Thanks ! Pascal |
Comment author: administrator Wish granted by DD 2003-08-13 |
Original bug ID: 1782
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Pascal Zimmer
Version: 3.07
OS: Linux
Submission from: vishnu.inria.fr (138.96.82.1)
In one of my project, I needed to empty the lexing buffer when I encountered an
error in an interactive session (in exactly the same way as OCaml does: stop
interpreting the remaining phrases when there is an error, discard what remains
and wait for new phrases).
After a few searches, I copied the empty_lexbuf function from the file
toploop.ml and it worked perfectly (this was with OCaml 3.04). I just noticed
this function didn't work anymore since 3.05... After checking, the function in
toploop.ml had been modified, and it has changed once more in 3.07beta1 !
Would it be possible to include empty_lexbuf directly in the module Lexing, so
that we do not have to bother with those modifications ? This function seems
quite useful to me in such situations.
Thanks.
The text was updated successfully, but these errors were encountered: