Allow full commands and blocks in type sections (#19181)
* allow full commands and blocks in type sections * update grammar * fix changelog [skip ci] * more tests * even more tests
This commit is contained in:
parent
ef634cc251
commit
61d682e733
8 changed files with 393 additions and 11 deletions
|
|
@ -60,7 +60,7 @@ primarySuffix = '(' (exprColonEqExpr comma?)* ')'
|
|||
| DOTLIKEOP optInd symbol generalizedLit?
|
||||
| '[' optInd exprColonEqExprList optPar ']'
|
||||
| '{' optInd exprColonEqExprList optPar '}'
|
||||
| &( '`'|IDENT|literal|'cast'|'addr'|'type') expr # command syntax
|
||||
| &( '`'|IDENT|literal|'cast'|'addr'|'type') expr (comma expr)* # command syntax
|
||||
pragma = '{.' optInd (exprColonEqExpr comma?)* optPar ('.}' | '}')
|
||||
identVis = symbol OPR? # postfix position
|
||||
identVisDot = symbol '.' optInd symbol OPR?
|
||||
|
|
@ -93,7 +93,8 @@ primary = operatorB primary primarySuffix* |
|
|||
('var' | 'out' | 'ref' | 'ptr' | 'distinct') primary
|
||||
/ prefixOperator* identOrLiteral primarySuffix*
|
||||
typeDesc = simpleExpr ('not' expr)?
|
||||
typeDefAux = simpleExpr ('not' expr)?
|
||||
typeDefAux = simpleExpr ('not' expr
|
||||
| postExprBlocks)?
|
||||
postExprBlocks = ':' stmt? ( IND{=} doBlock
|
||||
| IND{=} 'of' exprList ':' stmt
|
||||
| IND{=} 'elif' expr ':' stmt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue