updated grammer, fixed oversight
This commit is contained in:
parent
90dc35c109
commit
6b9359d901
2 changed files with 2 additions and 3 deletions
|
|
@ -299,7 +299,7 @@ proc parseSymbol(p: var TParser, allowNil = false): PNode =
|
||||||
var accm = ""
|
var accm = ""
|
||||||
while true:
|
while true:
|
||||||
case p.tok.tokType
|
case p.tok.tokType
|
||||||
of tkAccent, tkEof:
|
of tkAccent:
|
||||||
if accm == "":
|
if accm == "":
|
||||||
parMessage(p, errIdentifierExpected, p.tok)
|
parMessage(p, errIdentifierExpected, p.tok)
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ ampExpr = plusExpr (OP6 optInd plusExpr)*
|
||||||
plusExpr = mulExpr (OP7 optInd mulExpr)*
|
plusExpr = mulExpr (OP7 optInd mulExpr)*
|
||||||
mulExpr = dollarExpr (OP8 optInd dollarExpr)*
|
mulExpr = dollarExpr (OP8 optInd dollarExpr)*
|
||||||
dollarExpr = primary (OP9 optInd primary)*
|
dollarExpr = primary (OP9 optInd primary)*
|
||||||
symbol = '`' (KEYW|IDENT|operator|'(' ')'|'[' ']'|'{' '}'|'='|literal)+ '`'
|
symbol = '`' (KEYW|IDENT|operator|'('|')'|'['|']'|'{'|'}'|'='|literal)+ '`'
|
||||||
| IDENT
|
| IDENT
|
||||||
indexExpr = expr
|
indexExpr = expr
|
||||||
indexExprList = indexExpr ^+ comma
|
indexExprList = indexExpr ^+ comma
|
||||||
|
|
@ -166,7 +166,6 @@ object = 'object' pragma? ('of' typeDesc)? COMMENT? objectPart
|
||||||
typeClassParam = ('var')? symbol
|
typeClassParam = ('var')? symbol
|
||||||
typeClass = typeClassParam ^* ',' (pragma)? ('of' typeDesc ^* ',')?
|
typeClass = typeClassParam ^* ',' (pragma)? ('of' typeDesc ^* ',')?
|
||||||
&IND{>} stmt
|
&IND{>} stmt
|
||||||
distinct = 'distinct' optInd typeDesc
|
|
||||||
typeDef = identWithPragma genericParamList? '=' optInd typeDefAux
|
typeDef = identWithPragma genericParamList? '=' optInd typeDefAux
|
||||||
indAndComment?
|
indAndComment?
|
||||||
varTuple = '(' optInd identWithPragma ^+ comma optPar ')' '=' optInd expr
|
varTuple = '(' optInd identWithPragma ^+ comma optPar ')' '=' optInd expr
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue