From 9b51cb4a541ea38a48023cfa7b8eec2f8a6f1add Mon Sep 17 00:00:00 2001 From: Jentsch Date: Sun, 12 May 2019 20:58:42 +0200 Subject: [PATCH 1/2] Update parameter documentation --- compiler/src/dotty/tools/dotc/parsing/Parsers.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index ab5484380d37..89c6f5e8f99d 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -549,8 +549,8 @@ object Parsers { /** operand { infixop operand | ‘given’ (operand | ParArgumentExprs) } [postfixop], * * respecting rules of associativity and precedence. - * @param notAnOperator a token that does not count as operator. - * @param maybePostfix postfix operators are allowed. + * @param isOperator the current token counts as an operator. + * @param maybePostfix postfix operators are allowed. */ def infixOps( first: Tree, canStartOperand: Token => Boolean, operand: () => Tree, From 447e85409b2355ac08bbc3e357813753d985db5c Mon Sep 17 00:00:00 2001 From: Jentsch Date: Sun, 12 May 2019 21:00:13 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20unbalanced=20quoting=20(`')=20of=20to?= =?UTF-8?q?kens=20and=20used=20=E2=80=98=E2=80=99=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dotty/tools/dotc/parsing/Parsers.scala | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 89c6f5e8f99d..5cdcf8073da0 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -1914,8 +1914,8 @@ object Parsers { if (in.token == RPAREN) Nil else patterns() - /** ArgumentPatterns ::= `(' [Patterns] `)' - * | `(' [Patterns `,'] Pattern2 `:' `_' `*' ') + /** ArgumentPatterns ::= ‘(’ [Patterns] ‘)’ + * | ‘(’ [Patterns ‘,’] Pattern2 ‘:’ ‘_’ ‘*’ ‘)’ */ def argumentPatterns(): List[Tree] = inParens(patternsOpt()) @@ -2065,18 +2065,18 @@ object Parsers { /* -------- PARAMETERS ------------------------------------------- */ - /** ClsTypeParamClause::= `[' ClsTypeParam {`,' ClsTypeParam} `]' - * ClsTypeParam ::= {Annotation} [`+' | `-'] + /** ClsTypeParamClause::= ‘[’ ClsTypeParam {‘,’ ClsTypeParam} ‘]’ + * ClsTypeParam ::= {Annotation} [‘+’ | ‘-’] * id [HkTypeParamClause] TypeParamBounds * - * DefTypeParamClause::= `[' DefTypeParam {`,' DefTypeParam} `]' + * DefTypeParamClause::= ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’ * DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds * - * TypTypeParamCaluse::= `[' TypTypeParam {`,' TypTypeParam} `]' + * TypTypeParamCaluse::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’ * TypTypeParam ::= {Annotation} id [HkTypePamClause] TypeBounds * - * HkTypeParamClause ::= `[' HkTypeParam {`,' HkTypeParam} `]' - * HkTypeParam ::= {Annotation} ['+' | `-'] (id [HkTypePamClause] | _') TypeBounds + * HkTypeParamClause ::= ‘[’ HkTypeParam {‘,’ HkTypeParam} ‘]’ + * HkTypeParam ::= {Annotation} [‘+’ | ‘-’] (id [HkTypePamClause] | ‘_’) TypeBounds */ def typeParamClause(ownerKind: ParamOwner.Value): List[TypeDef] = inBrackets { def typeParam(): TypeDef = { @@ -2557,8 +2557,8 @@ object Parsers { } } - /** TmplDef ::= ([`case'] ‘class’ | trait’) ClassDef - * | [`case'] `object' ObjectDef + /** TmplDef ::= ([‘case’] ‘class’ | ‘trait’) ClassDef + * | [‘case’] ‘object’ ObjectDef * | ‘enum’ EnumDef * | ‘instance’ InstanceDef */