mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
use CalledVia::BangSuffix
This commit is contained in:
parent
a394f1b4cf
commit
a983ab8341
3 changed files with 8 additions and 4 deletions
|
@ -191,7 +191,7 @@ fn desugar_defs_node_suffixed<'a>(
|
|||
},
|
||||
}),
|
||||
arena.alloc(task_await_apply_args),
|
||||
CalledVia::Space,
|
||||
CalledVia::BangSuffix,
|
||||
),
|
||||
))
|
||||
} else if value_index == 0 {
|
||||
|
@ -249,7 +249,7 @@ fn desugar_defs_node_suffixed<'a>(
|
|||
},
|
||||
}),
|
||||
arena.alloc(task_await_apply_args),
|
||||
CalledVia::Space,
|
||||
CalledVia::BangSuffix,
|
||||
),
|
||||
))
|
||||
} else {
|
||||
|
@ -310,7 +310,7 @@ fn desugar_defs_node_suffixed<'a>(
|
|||
},
|
||||
}),
|
||||
arena.alloc(task_await_apply_args),
|
||||
CalledVia::Space,
|
||||
CalledVia::BangSuffix,
|
||||
),
|
||||
));
|
||||
|
||||
|
|
|
@ -186,6 +186,6 @@ impl<T, U> EitherIndex<T, U> {
|
|||
}
|
||||
|
||||
pub fn decrement_index(&mut self) {
|
||||
self.index.saturating_sub(1);
|
||||
self.index = self.index.saturating_sub(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,6 +92,10 @@ pub enum CalledVia {
|
|||
/// This call is the result of desugaring a Record Builder field.
|
||||
/// e.g. succeed { a <- get "a" } is transformed into (get "a") (succeed \a -> { a })
|
||||
RecordBuilder,
|
||||
|
||||
/// This call is the result of desugaring a Task.await from `!` syntax
|
||||
/// e.g. Stdout.line! "Hello" becomes Task.await (Stdout.line "Hello") \{} -> ...
|
||||
BangSuffix,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue