Skip to content

Align parser with quotes and splices spec #15009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nicolasstucki opened this issue Apr 22, 2022 · 0 comments
Open

Align parser with quotes and splices spec #15009

nicolasstucki opened this issue Apr 22, 2022 · 0 comments
Assignees

Comments

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Apr 22, 2022

The current implementation of the parser allows more than is needed. These are vestiges from the first versions of the system. Most of them should already emit an error or warning stating that the new syntax should be used. Now we need to tighten the rules to make sure they all emit errors.

SimpleExpr ::=  ...
             |  Quoted
             |  Splice
             |  ...

Pattern    ::=  ...
             |  Quoted
             |  ...

Quotes

Quotes come in four flavors: quoted identifiers, quoted blocks, quoted blocks patterns and quoted type patterns.

Quoted ::= `'` alphaid                     // quoted identifier
         |  `'` `{` Block `}`              // quoted block
         |  `'` `[` Type `]` if  inPattern // quoted type pattern

Splices

Splices come in three flavors: spliced identifiers, spliced blocks and splice patterns.

Splice ::=  `$` alphaid         if  inQuoteBlock    // spliced identifier
         |  `$` `{` Block `}`   if !inQuotePattern  // spliced block
         |  `$` `{` Pattern `}` if  inQuotePattern  // splice pattern
@nicolasstucki nicolasstucki self-assigned this Apr 22, 2022
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 22, 2022
These have have been emitting migration warning in 3.0 and 3.1 even if the
syntax was already deprecated in 3.0. These where allowed syntax found
in older papers.

The case `'[T]` was actually buggy but no one reported this bug so far.
A good indication that this older syntax has not been used in a while.

First step towards fixing scala#15009.
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue May 10, 2022
These have have been emitting migration warning in 3.0 and 3.1 even if the
syntax was already deprecated in 3.0. These where allowed syntax found
in older papers.

The case `'[T]` was actually buggy but no one reported this bug so far.
A good indication that this older syntax has not been used in a while.

First step towards fixing scala#15009.
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue May 19, 2022
These have have been emitting migration warning in 3.0 and 3.1 even if the
syntax was already deprecated in 3.0. These where allowed syntax found
in older papers.

The case `'[T]` was actually buggy but no one reported this bug so far.
A good indication that this older syntax has not been used in a while.

First step towards fixing scala#15009.
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue May 24, 2022
These have have been emitting migration warning in 3.0 and 3.1 even if the
syntax was already deprecated in 3.0. These where allowed syntax found
in older papers.

The case `'[T]` was actually buggy but no one reported this bug so far.
A good indication that this older syntax has not been used in a while.

First step towards fixing scala#15009.
bishabosha pushed a commit to dotty-staging/dotty that referenced this issue Oct 18, 2022
These have have been emitting migration warning in 3.0 and 3.1 even if the
syntax was already deprecated in 3.0. These where allowed syntax found
in older papers.

The case `'[T]` was actually buggy but no one reported this bug so far.
A good indication that this older syntax has not been used in a while.

First step towards fixing scala#15009.
@ckipp01 ckipp01 added stat:needs triage Every issue needs to have an "area" and "itype" label area:documentation and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants