aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-15 12:09:20 +0200
committerMartin Odersky <odersky@gmail.com>2015-05-21 17:41:12 +0200
commit1f908b420e4efe944ea764bbba239472c9c3cc92 (patch)
tree25527f99d25f8ec0aa62134ca70d1ed0313cd2c2 /docs
parentbf81fb62084f9e04e43906396c3ac5e307caca63 (diff)
downloaddotty-1f908b420e4efe944ea764bbba239472c9c3cc92.tar.gz
dotty-1f908b420e4efe944ea764bbba239472c9c3cc92.tar.bz2
dotty-1f908b420e4efe944ea764bbba239472c9c3cc92.zip
Allow AnnotatedType in operands of `with`.
Brings in line with Scala 2 spec.
Diffstat (limited to 'docs')
-rw-r--r--docs/SyntaxSummary.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/SyntaxSummary.txt b/docs/SyntaxSummary.txt
index e40b3fd6c..dadf15bed 100644
--- a/docs/SyntaxSummary.txt
+++ b/docs/SyntaxSummary.txt
@@ -99,8 +99,9 @@ grammar.
FunArgTypes ::= InfixType
| `(' [ FunArgType {`,' FunArgType } ] `)'
InfixType ::= RefinedType {id [nl] RefinedType} InfixOp(t1, op, t2)
- RefinedType ::= WithType {Annotation | [nl] Refinement} Annotated(t, annot), RefinedTypeTree(t, ds)
- WithType ::= SimpleType {`with' SimpleType} (deprecated)
+ RefinedType ::= WithType {[nl] Refinement} RefinedTypeTree(t, ds)
+ WithType ::= AnnotType {`with' AnnotType} (deprecated)
+ AnnotType ::= SimpleType {Annotation} Annotated(t, annot)
SimpleType ::= SimpleType TypeArgs AppliedTypeTree(t, args)
| SimpleType `#' id SelectFromTypeTree(t, name)
| StableId
@@ -121,9 +122,9 @@ grammar.
Expr ::= FunParams `=>' Expr Function(args, expr), Function(ValDef([implicit], id, TypeTree(), EmptyTree), expr)
| Expr1
- FunParams ::= Bindings
- | [`implicit'] id
- | `_'
+ FunParams ::= Bindings
+ | [`implicit'] id
+ | `_'
ExprInParens ::= PostfixExpr `:' Type
| Expr
BlockResult ::= (FunParams | [`implicit'] id `:' InfixType) => Block
@@ -301,7 +302,7 @@ grammar.
TemplateOpt ::= [`extends' Template | [nl] TemplateBody]
Template ::= ConstrApps [TemplateBody] | TemplateBody Template(constr, parents, self, stats)
ConstrApps ::= ConstrApp {`with' ConstrApp}
- ConstrApp ::= SimpleType {ArgumentExprs} Apply(tp, args)
+ ConstrApp ::= AnnotType {ArgumentExprs} Apply(tp, args)
ConstrExpr ::= SelfInvocation
| ConstrBlock