Feat: Use assign in functions and anonymous functions#473
Merged
JSAbrahams merged 15 commits intodevelopfrom Jun 25, 2025
Merged
Feat: Use assign in functions and anonymous functions#473JSAbrahams merged 15 commits intodevelopfrom
JSAbrahams merged 15 commits intodevelopfrom
Conversation
4f33196 to
361b959
Compare
9af21ef to
1fc9894
Compare
1fc9894 to
3d907af
Compare
3d907af to
a6a7fd9
Compare
a6a7fd9 to
c171001
Compare
- Still need to rework the handle, re-using the node gives issues in check and desugar stages. Instead, better to make call more powerfull and make that store cases
5fedcc4 to
ce822ed
Compare
added 3 commits
June 25, 2025 10:29
Note that the Handle AST construct still exists. We simply remove the keyword, and construct a handle Node if we see an expression or statement followed by a newline and indent. This signifies we are going to parse match cases of a handle. Still have to: - Make sure type checker takes into account that we added a '!' char a function call. This signifies we don't exhaustively catch all exceptions but that some are thrown up. This also means we need to make sure the parser (1) catches this char and (2) passes this information to the type checker
ce822ed to
453f1a1
Compare
67e3194 to
b36fb7a
Compare
b36fb7a to
9a5346a
Compare
9a5346a to
cddc126
Compare
May be a bit confusing to people coming from other languages, but still, fun to play with syntax
8c4cc98 to
5ad170d
Compare
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.
Relevant issues
None
Summary
Functions are definitions, so we assign to them.
Similarly, we assign with lambda.
Playing around a bit to see if the grammar still looks nice, but I think that conceptually this makes more sense.
Added Tests