fixed recently introduced parser bugs
This commit is contained in:
parent
2591ac0ada
commit
c43bf78000
1 changed files with 2 additions and 2 deletions
|
|
@ -738,7 +738,7 @@ proc isExprStart(p: TParser): bool =
|
||||||
of tkSymbol, tkAccent, tkOpr, tkNot, tkNil, tkCast, tkIf,
|
of tkSymbol, tkAccent, tkOpr, tkNot, tkNil, tkCast, tkIf,
|
||||||
tkProc, tkIterator, tkBind,
|
tkProc, tkIterator, tkBind,
|
||||||
tkParLe, tkBracketLe, tkCurlyLe, tkIntLit..tkCharLit, tkVar, tkRef, tkPtr,
|
tkParLe, tkBracketLe, tkCurlyLe, tkIntLit..tkCharLit, tkVar, tkRef, tkPtr,
|
||||||
tkTuple, tkType, tkWhen, tkCase, tkShared:
|
tkTuple, tkObject, tkType, tkWhen, tkCase, tkShared:
|
||||||
result = true
|
result = true
|
||||||
else: result = false
|
else: result = false
|
||||||
|
|
||||||
|
|
@ -790,7 +790,7 @@ proc primary(p: var TParser, mode: TPrimaryMode): PNode =
|
||||||
of tkPtr: result = parseTypeDescKAux(p, nkPtrTy, mode)
|
of tkPtr: result = parseTypeDescKAux(p, nkPtrTy, mode)
|
||||||
of tkShared: result = parseTypeDescKAux(p, nkSharedTy, mode)
|
of tkShared: result = parseTypeDescKAux(p, nkSharedTy, mode)
|
||||||
of tkType: result = parseTypeDescKAux(p, nkTypeOfExpr, mode)
|
of tkType: result = parseTypeDescKAux(p, nkTypeOfExpr, mode)
|
||||||
of tkTuple: result = parseTuple(p)
|
of tkTuple: result = parseTuple(p, mode == pmTypeDef)
|
||||||
of tkProc: result = parseProcExpr(p, mode notin {pmTypeDesc, pmTypeDef})
|
of tkProc: result = parseProcExpr(p, mode notin {pmTypeDesc, pmTypeDef})
|
||||||
of tkIterator:
|
of tkIterator:
|
||||||
if mode in {pmTypeDesc, pmTypeDef}:
|
if mode in {pmTypeDesc, pmTypeDef}:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue