summaryrefslogtreecommitdiff
path: root/spec/01-lexical-syntax.md
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2016-01-30 21:53:27 -0800
committerSom Snytt <som.snytt@gmail.com>2016-05-20 16:12:03 -0700
commiteeef2602dc97f84c798713d7a2c924ea2b0d6012 (patch)
tree06a2e64b97d73f303583f82af8bdfafc75aff477 /spec/01-lexical-syntax.md
parent15189d14953335f7a3a8310861d045d21ab22d48 (diff)
downloadscala-eeef2602dc97f84c798713d7a2c924ea2b0d6012.tar.gz
scala-eeef2602dc97f84c798713d7a2c924ea2b0d6012.tar.bz2
scala-eeef2602dc97f84c798713d7a2c924ea2b0d6012.zip
SI-8044 Allow binding backquoted varid in patterns
Previously, a varid could not be backquoted, so that it was not possible to introduce variables with names such as `type` in a match expression. This commit allows backquoted varids in `case x @ _` and `case x: Int`. In neither position is a stable id accepted, that is, an id with leading uppercase. Therefore, this commit merely relaxes the backquoted varid to be taken as a normal varid in these contexts.
Diffstat (limited to 'spec/01-lexical-syntax.md')
-rw-r--r--spec/01-lexical-syntax.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/01-lexical-syntax.md b/spec/01-lexical-syntax.md
index 0232ed9a34..4e92c7cf7b 100644
--- a/spec/01-lexical-syntax.md
+++ b/spec/01-lexical-syntax.md
@@ -49,6 +49,8 @@ classes (Unicode general category given in parentheses):
```ebnf
op ::= opchar {opchar}
varid ::= lower idrest
+boundvarid ::= varid
+ | ‘`’ varid ‘`’
plainid ::= upper idrest
| varid
| op