mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Parse !
suffixes as an Expr::TaskAwaitBang instead of using suffix field in ident
This commit is contained in:
parent
4b4aee3c1a
commit
6080c12ca8
8 changed files with 94 additions and 89 deletions
|
@ -252,7 +252,7 @@ pub enum Expr<'a> {
|
|||
is_negative: bool,
|
||||
},
|
||||
|
||||
// String Literals
|
||||
/// String Literals
|
||||
Str(StrLiteral<'a>), // string without escapes in it
|
||||
/// eg 'b'
|
||||
SingleQuote(&'a str),
|
||||
|
@ -266,6 +266,9 @@ pub enum Expr<'a> {
|
|||
/// Look up exactly one field on a tuple, e.g. `(x, y).1`.
|
||||
TupleAccess(&'a Expr<'a>, &'a str),
|
||||
|
||||
/// Task await bang - i.e. the ! in `File.readUtf8! path`
|
||||
TaskAwaitBang(&'a Expr<'a>),
|
||||
|
||||
// Collection Literals
|
||||
List(Collection<'a, &'a Loc<Expr<'a>>>),
|
||||
|
||||
|
@ -1873,7 +1876,8 @@ impl<'a> Malformed for Expr<'a> {
|
|||
Str(inner) => inner.is_malformed(),
|
||||
|
||||
RecordAccess(inner, _) |
|
||||
TupleAccess(inner, _) => inner.is_malformed(),
|
||||
TupleAccess(inner, _) |
|
||||
TaskAwaitBang(inner) => inner.is_malformed(),
|
||||
|
||||
List(items) => items.is_malformed(),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue