mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00

In order to desugar `dbg` in a pipeline we need to allow a bare `dbg` node in desugaring and only report it as an error if the bare node survives to the next step of canonicalization. This means we move the error code out of `desugar_expr` and into `canonicalize_expr`. This is much simpler to do now that these functions use the same `env` struct, since previously we would have had to pass down extra args to `canonicalize_expr`. Sharing the `env` struct means that we also don't have to worry about calculating `line_info` more than once.
16 lines
229 B
Text
16 lines
229 B
Text
SpaceAfter(
|
|
BinOps(
|
|
[
|
|
(
|
|
@0-1 Num(
|
|
"1",
|
|
),
|
|
@2-4 Pizza,
|
|
),
|
|
],
|
|
@5-8 Dbg,
|
|
),
|
|
[
|
|
Newline,
|
|
],
|
|
)
|