fixes grammar typos [backport] (#19289)

This commit is contained in:
Andreas Rumpf 2021-12-27 17:28:19 +01:00 • committed by GitHub
commit a61bbf7d8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -582,10 +582,10 @@ proc parsePar(p: var Parser): PNode =
#| | 'finally' | 'except' | 'for' | 'block' | 'const' | 'let' #| | 'finally' | 'except' | 'for' | 'block' | 'const' | 'let'
#| | 'when' | 'var' | 'mixin' #| | 'when' | 'var' | 'mixin'
#| par = '(' optInd #| par = '(' optInd
#| ( &parKeyw (ifExpr \ complexOrSimpleStmt) ^+ ';' #| ( &parKeyw (ifExpr / complexOrSimpleStmt) ^+ ';'
#| | ';' (ifExpr \ complexOrSimpleStmt) ^+ ';' #| | ';' (ifExpr / complexOrSimpleStmt) ^+ ';'
#| | pragmaStmt #| | pragmaStmt
#| | simpleExpr ( ('=' expr (';' (ifExpr \ complexOrSimpleStmt) ^+ ';' )? ) #| | simpleExpr ( ('=' expr (';' (ifExpr / complexOrSimpleStmt) ^+ ';' )? )
#| | (':' expr (',' exprColonEqExpr ^+ ',' )? ) ) ) #| | (':' expr (',' exprColonEqExpr ^+ ',' )? ) ) )
#| optPar ')' #| optPar ')'
# #

View file

@ -37,10 +37,10 @@ parKeyw = 'discard' | 'include' | 'if' | 'while' | 'case' | 'try'
| 'finally' | 'except' | 'for' | 'block' | 'const' | 'let' | 'finally' | 'except' | 'for' | 'block' | 'const' | 'let'
| 'when' | 'var' | 'mixin' | 'when' | 'var' | 'mixin'
par = '(' optInd par = '(' optInd
( &parKeyw (ifExpr \ complexOrSimpleStmt) ^+ ';' ( &parKeyw (ifExpr / complexOrSimpleStmt) ^+ ';'
| ';' (ifExpr \ complexOrSimpleStmt) ^+ ';' | ';' (ifExpr / complexOrSimpleStmt) ^+ ';'
| pragmaStmt | pragmaStmt
| simpleExpr ( ('=' expr (';' (ifExpr \ complexOrSimpleStmt) ^+ ';' )? ) | simpleExpr ( ('=' expr (';' (ifExpr / complexOrSimpleStmt) ^+ ';' )? )
| (':' expr (',' exprColonEqExpr ^+ ',' )? ) ) ) | (':' expr (',' exprColonEqExpr ^+ ',' )? ) ) )
optPar ')' optPar ')'
literal = | INT_LIT | INT8_LIT | INT16_LIT | INT32_LIT | INT64_LIT literal = | INT_LIT | INT8_LIT | INT16_LIT | INT32_LIT | INT64_LIT