feat[venom]: add venom parser#4381
Merged
charles-cooper merged 32 commits intovyperlang:masterfrom Dec 14, 2024
Merged
Conversation
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
|
Collaborator
|
🚀 |
Contributor
Author
|
@charles-cooper btw how I would I toggle optimizations on-off for faster venom compilation? |
Member
charles-cooper
left a comment
There was a problem hiding this comment.
very slick -- much simpler than i was expecting! left a few comments
Member
|
i think it would be good to have a couple test cases! e.g. in |
Contributor
Author
|
@charles-cooper should be ready to merge now |
charles-cooper
approved these changes
Dec 14, 2024
Member
charles-cooper
left a comment
There was a problem hiding this comment.
lgtm. a couple things for future scope:
- make data section optional in the grammar
- make entry block optional in the grammar (similarly to llvm)
- more output formats (
-f asm, opcodes, bytecode)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
I added a "frontend" for venom, allowing you to compile independent venom files.
How I did it
I defined a new grammar (a bit simpler than what the readme initially suggested) & parser using the
larkparser generator library.How to verify it
Run the
venomCLI against the example in the readme by putting it in aexample.venomfile and runningvenom example.venomCommit message
Description for the changelog
Added independent CLI for compiling venom
Cute Animal Picture