Workaround Nim regression #23611 related to dirty template (#90)

This commit is contained in:
andri lim 2024-05-20 22:12:03 +07:00 committed by GitHub
parent 1ac1d69f95
commit 4d0b0662ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -114,6 +114,7 @@ template requireNextChar(lex: JsonLexer): char =
lex.read()
template enterNestedStructure(lex: JsonLexer, action: untyped) {.dirty.} =
bind errNestedDepthLimit
inc lex.depthLimit
if lex.conf.nestedDepthLimit > 0 and
lex.depthLimit > lex.conf.nestedDepthLimit: