effekt-lang / effekt-lang/effekt

Trailing unit / hole in a hole statement

Open
#1,051 0 comments 0 reactions 0 assignees View on GitHub
requires-design
Dominant language
Scala
Stars
469
Forks
41
Avg merge
1d 16h
Merged PRs (30d)
23

Description

```scala
def foo(): Int = <{
val n = 42
}>
```
fails in the parser with "Expected statements but got `}>`".

Could we instead apply the same logic as in https://github.com/effekt-lang/effekt/pull/1019 and add a unit / hole in there at the end?

We currently handle only seeing `}`, but _when we're in a context beginning in `<{`_, we could also use `}>` as a stop here:
https://github.com/effekt-lang/effekt/blob/3ce4ad22d402fdc43eaad54c98a69a4c3cd2740c/effekt/shared/src/main/scala/effekt/RecursiveDescent.scala#L189-L191

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.