-
-
Notifications
You must be signed in to change notification settings - Fork 122
parse unsafe extern blocks without conflict and safe fn / static items #256
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
base: master
Are you sure you want to change the base?
Conversation
a29fc35
to
8139f82
Compare
8139f82
to
ee3c749
Compare
If possible, it would be cool to avoid the conflict by making the structure of function items and external blocks (and maybe other types of items) more consistent with each other. Generally, I'm ok with parsing a superset of what is actually allowed, if it gets us more consistency. Do you think there is any unification that makes sense between functions' modifiers, and extern blocks modifiers, and possibly any other items' modifiers? |
ee3c749
to
d35d2ed
Compare
last time i checked i thought this would be almost (if not outright) impossible, but thanks to your pointer (and actually learning more about tree-sitter over the last like month) i actually managed to do it without the conflict! very satisfying, though you can now write a now just one more rebase ... |
f0b18ce
to
1b5d5e9
Compare
Yeah, I'm generally ok with stuff like that. Seems like arguably a semantic error, as opposed to a syntactic one. Just curious - how is the parser table size ( |
with this version it's 3861, with the conflict it's 3856. on master it's 3823. |
Ok, pretty small delta either way. |
1b5d5e9
to
d2e7a37
Compare
ci still doesn't work :( |
Are you generating it with the latest |
i think so?
|
ok when i do a fresh clone of the repo, run |
This PR is also integrated in the |
d2e7a37
to
381b9ca
Compare
for now i did the second suggestion i had and implemented parsing of unsafe extern blocks without a conflict, as well as parsing |
fixes: #250
#288 also partially addresses this, specifically only the parsing of
unsafe extern "C" {}
blocks, but it does so by adding them to the conflicts. this changes the implementation, so that you don't actually need the conflict field.additionally this also parses
safe fn
andsafe static
, as well asunsafe static
.specified here, here and here
regarding #229:
diff