-
Notifications
You must be signed in to change notification settings - Fork 13
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
Rewindable parser #17
Conversation
6d5540c
to
43c8ed3
Compare
4308ecc
to
4ebba93
Compare
This commit adds the ability to restart parsing only a few tokens before any document change. This should greatly improve performance, especially when editing the middle or end of large files.
454fcdb
to
96c0a1c
Compare
Additionally, use a dedicated token to avoid retokenization of program IDs
96c0a1c
to
403917f
Compare
85fa05d
to
967b058
Compare
967b058
to
e420514
Compare
…c_format` These changes remove pointless uses of `Cobol_config.source_format` in the pre-processor.
a2441c8
to
261193d
Compare
261193d
to
fa0abb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stopped when I found yet another GADT. I think COBOL is complex enough without adding OCaml complexity on top of it. Please, progressively remove GADTs instead of adding new ones...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This touches too much code that I don't know to be able to do a meaningful proper review, but what I could read seems reasonable (if verbose).
ce6bf5c
to
75119bd
Compare
75119bd
to
8529fff
Compare
These changes add the ability to restart parsing only a few tokens before any document change. This should greatly improve performance, especially when editing the middle or end of large files.
Changes also include some refactoring of the parser and pre-processor, with a unification of their interface (notably, with options always passed using a single record).
Some tests of the rewinding feature come as well, along with fixes for some bugs they helped discover ;-).