-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for ADT and general patterns
Since (future) Nickel 1.5, Nickel supports ADTs (enum variants), which extended the language of destructuring patterns. Moreover, match expressions have been also extended to handle full patterns instead of just enum tags. This commit updates the tree-sitter grammar to reflect those changes, and in particular adds support for: - enum variants - enum patterns - pattern matching
- Loading branch information
Showing
16 changed files
with
19,657 additions
and
16,739 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -487,7 +487,7 @@ fun a => b | |
(term | ||
(uni_term | ||
(fun_expr | ||
(pattern | ||
(pattern_fun | ||
(ident)) | ||
(term | ||
(uni_term | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ fibonacci 10 | |
(term | ||
(uni_term | ||
(fun_expr | ||
(pattern | ||
(pattern_fun | ||
(ident)) | ||
(term | ||
(uni_term | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,7 @@ let metadata_ = { | |
(atom | ||
(uni_term | ||
(fun_expr | ||
(pattern | ||
(pattern_fun | ||
(ident)) | ||
(term | ||
(uni_term | ||
|
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.