parent
5933aece9b
commit
2859069dbe
2 changed files with 10 additions and 1 deletions
|
|
@ -1146,7 +1146,7 @@ proc isExprStart(p: Parser): bool =
|
||||||
of tkSymbol, tkAccent, tkOpr, tkNot, tkNil, tkCast, tkIf, tkFor,
|
of tkSymbol, tkAccent, tkOpr, tkNot, tkNil, tkCast, tkIf, tkFor,
|
||||||
tkProc, tkFunc, tkIterator, tkBind, tkBuiltInMagics,
|
tkProc, tkFunc, tkIterator, tkBind, tkBuiltInMagics,
|
||||||
tkParLe, tkBracketLe, tkCurlyLe, tkIntLit..tkCustomLit, tkVar, tkRef, tkPtr,
|
tkParLe, tkBracketLe, tkCurlyLe, tkIntLit..tkCustomLit, tkVar, tkRef, tkPtr,
|
||||||
tkTuple, tkObject, tkWhen, tkCase, tkOut:
|
tkTuple, tkObject, tkWhen, tkCase, tkOut, tkTry, tkBlock:
|
||||||
result = true
|
result = true
|
||||||
else: result = false
|
else: result = false
|
||||||
|
|
||||||
|
|
|
||||||
9
tests/parser/t12274.nim
Normal file
9
tests/parser/t12274.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
var s: seq[int]
|
||||||
|
s.add block:
|
||||||
|
let i = 1
|
||||||
|
i
|
||||||
|
s.add try:
|
||||||
|
2
|
||||||
|
except:
|
||||||
|
3
|
||||||
|
doAssert s == @[1, 2]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue