-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change AST representation of match cases
Previously the match statement node contained a list of MatchCond objects. Each of these would have a condition, but an optional body. All consecutive MatchCond until you saw one with a body were supposed to be part of the same "branch". For eg: match foo { Foo | Bar | Baz => print(...) Qux => 1 } would be (Foo, null), (Bar, null), (Baz, print(...)), (Qux, 1) This was a little awkward to traverse. Now, each MatchCond stores a list of all the actual conditions, and also the body, which is a more natural way of storing the AST.
- Loading branch information
1 parent
1e347fc
commit 824ab62
Showing
8 changed files
with
1,458 additions
and
1,564 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.