Problem
-------
1. Repeat pattern with `*` doesn't parse.
2. Capture pattern `@` doesn't capture wildcard.
Solution
--------
1. This implements support for `*` in pattern.
2. This also allows using `_@`.
Problem
-------
Braceless syntax can terminate with closing paren or bracket
of the outer context, but we don't support that.
Solution
--------
This changes the scanner so when an outdent is expected,
closing paren or bracket can inject an outdent.
Summary
-------
Single line `$.comment` is split into a choice of `$._comment_text` and
`$.using_directive` to parse a structure of comments like
```
//> using scala 3.3.0
```
Problem
-------
Soft keywords ('open', 'end', 'infix', etc.) are not allowed to be used
as identifiers, e.g. in
```
open()
```
Solution
-------
Introduce `$._soft_identifier` with a lower precedence than modifiers
Problem
-------
Top-level expressions are not supported. However, it's a valid case for
Scala scripts or sbt configurations
Solution
-------
Now that AUTOMATIC_SEMICOLON tokens are handled at the top-level
enabling top-level expressions is done by including `$.expression` into
`$._top_level_definition`
Problem
-------
Compound type with refinement (structural type with a parent)
doesn't parse.
Solution
--------
This adds support for it.
It collides with context bounds `A: B: C`, so the precedence is set to
-1.
Problem
-------
Self-types are not parsed in braceless trait definitions:
```scala
trait A:
this: B =>
````
Solution
-------
Move existing `$.self_type` rule in trait definition into indented scope.
Rebalance `$.self_type` precedence.
Without explicit precedence it looses to `$.call_expression` in
```scala
trait A {
self: B =>
def f = ""
}
```
With static precedence instead of dynamic it leads to errors in
definitions like:
```scala
class A
x: Int // this should be $.ascription_expression
enum B:
case C
```
Problem
-------
`val` definitions with multiple identifiers are not supported.
Solution
--------
This implements `identifiers`, which acts like a pattern.
Problem
-------
Annotations on Scala 3 enums and their cases are not supported, e.g.
```scala
@A enum E:
@A("") @B case A
```
Solution
-------
Allow annotations in enum definitions
Problem
-------
Nested block comments are not parsed, e.g.
```
/* /* */ */
```
Solution
-------
Leave $.comment for single-line comments.
Introduce $.block_comment for block-comments.
Make $.block_comment out of several tokens to be able to detect nested
block comments
Problem
-------
By-name parameters in class definitions were not supported:
```
class A(a: => B)
```
Solution
-------
Support by-name parameters by changing the rule describing class
parameter type from `$._type` to `$._param_type`
Problem
-------
The grammar assumes upper type bound to go before lower type bound.
Although, in Scala it's the opposite:
```
TypeBounds ::= [‘>:’ Type] [‘<:’ Type]
```
Solution
-------
Swap type bounds' order in the grammar