Improve error message when parsing truncated let expressions (#1639)

This previously yielded
```
Unexpected token `}`. Expected `}`.
```
Pretty confusing, no?

Now it's just
```
Unexpected token `}`.
```

Resolves #1638
This commit is contained in:
Jen Basch
2026-06-02 16:00:46 -07:00
committed by GitHub
parent 99cac1f886
commit 68f7d06eed
5 changed files with 12 additions and 2 deletions
@@ -0,0 +1,3 @@
foo {
bar = let (qux = 1)
}
@@ -0,0 +1,6 @@
–– Pkl Error ––
Unexpected token `}`.
x | }
^
at letExpressionError3 (file:///$snippetsDir/input/errors/letExpressionError3.pkl)