correct grammar (ref #20199) and add check for grammar.txt (#20494)

* correct grammar; ref #20199

* add check for keeping grammar.txt up-to-date

* add nimTestGrammar
This commit is contained in:
ringabout 2022-10-06 22:36:32 +08:00 • committed by GitHub
commit e323b91a32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 11 deletions

View file

@ -175,8 +175,7 @@ objectDecl = 'object' ('of' typeDesc)? COMMENT? objectPart
conceptParam = ('var' | 'out')? symbol
conceptDecl = 'concept' conceptParam ^* ',' (pragma)? ('of' typeDesc ^* ',')?
&IND{>} stmt
typeDef = identWithPragmaDot genericParamList? '=' optInd typeDefAux
indAndComment? / identVisDot genericParamList? pragma '=' optInd typeDefAux
typeDef = identVisDot genericParamList? pragma '=' optInd typeDefAux
indAndComment?
varTuple = '(' optInd identWithPragma ^+ comma optPar ')' '=' optInd expr
colonBody = colcom stmt postExprBlocks?