-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Create parser with AST #19
Merged
Merged
Conversation
This file contains 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
Part of #12 filc can now take a single file as argument and parse it. Only literals are supported for now Note: dump of AST structure will be done in a future commit. It needs visitor pattern to be implemented
Closed
Part of #12 Comments are simply ignored by the Lexer *Testing:* Write comments in your file, they should be ignored
Part of #12 By running `filc --dump=ast <file>` you can now see AST structure of you program
Part of #12 When testing this workflow on antoher repository, it appears that it wasn't working. There was 2 problems - Lack of permission: the step needs `contents:write` permission to be able to add files to the release. I give it to entire workflow to avoid problems. I also add packages permissions for when we will add docker image - Wrong config: the file argument of the actions takes a semicolon list of file, not a multiline list. I've bad-read this part of the documentation (my fault)
Part of #12 We can now declare variable and constant with: - var name - val name We cannot yet assign value to them Also increase clang-format column limit to 120 (80 is to small)
Part of #12 Variable can now have a type and a value
Part of #12 Instead of having multiple tests in same TEST, expand them to multiple TESTs. It will ease debug and corrections
Part of #12 https://typicode.github.io/husky/ is a tool that help configuring git hooks. Here we use it for pre-commit hook to run clang-format each time *Testing:* If you write some c++ code which is not valid along clang-format, when commiting it should be linted automagically
Part of #12 In previous commit we've added Husky which uses (p)npm. In order to keep this dependency up-to-date, add 'npm' to dependabot config
Part of #12 The parser now handle binary calculs with `left op right`. Operator priorities should be good, I'm just not totally sure for the priority between % and /,*.
c5a70a5
to
433faff
Compare
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.
Closes #12