mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
New Lambda Syntax with |...|
This adds parser support for the new lambda syntax. It does not remove the existing syntax, nor will the new syntax be retained in formatting. That will be done in a separate PR to keep the two respective PRs relatively small and easy to review.
This commit is contained in:
parent
4e66910ef8
commit
8e1e1520e3
6 changed files with 172 additions and 50 deletions
|
@ -747,6 +747,7 @@ impl<'a> EInParens<'a> {
|
|||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum EClosure<'a> {
|
||||
Bar(Position),
|
||||
Space(BadInputError, Position),
|
||||
Start(Position),
|
||||
Arrow(Position),
|
||||
|
@ -768,7 +769,8 @@ impl<'a> EClosure<'a> {
|
|||
EClosure::Body(expr, _) => expr.get_region(),
|
||||
|
||||
// Cases with Position values
|
||||
EClosure::Space(_, p)
|
||||
EClosure::Bar(p)
|
||||
| EClosure::Space(_, p)
|
||||
| EClosure::Start(p)
|
||||
| EClosure::Arrow(p)
|
||||
| EClosure::Comma(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue