-
Notifications
You must be signed in to change notification settings - Fork 97
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
Simpler parser ast #364
Simpler parser ast #364
Conversation
Restrictions on the target are moved to semantics.ml
References are represented as strings in Parser.Ast
This completely remove references from Parser.Ast
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.
Ok, having seen this change, it actually looks quite reasonable, and I think we can merge this.
Apart from the comments, there are also some CI failures on older versions of OCaml.
Let me know if you'd like #351 reopened, or submit a new PR for how you want to expose this AST.
I still would like to avoid committing to the stability of Model.Comment
, Parser.Ast
, or the parser, but we can reach out when making any breaking changes.
Thanks for your review ! I cleaned the code but did not manage to fix the CI with 4.08 yet. |
Thanks for merging ! |
Hi!
As I explained in #355,
Model.Comment
is a bit hard to obtain and understand and too strict and lossy on the input.Some of this issues could be solved by changing
Model.Comment
with a bit of work. But I think that in the future, this will make similar issues harder to solve as Odoc codebase and language change.This PR simplifies
Parser.Ast
to make it closer to the concrete syntax and simpler by delaying some parsing tosemantics.ml
:Raw_markup
targets can be any string or none.Space
element is generated)This PR also removes some uses of
Model
types, as @lpw25 suggested, but not all yet.This PR is supposed to follow #351 but if this approach is definitively rejected, it should be a good first step at improving
Model.Comment
.What do you think?
Thanks!