Skip to content

Commit

Permalink
fix recursive gcsafe issue
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Aug 16, 2023
1 parent 647cb66 commit d7fd803
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/marggers/parser.nim
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ type
frReachedEnd
frFailed

proc parseDelimed*(parser; options; delim: string, singleLine: SingleLineBool): (DelimFinishReason, seq[MarggersElement]) =
proc parseDelimed*(parser; options; delim: string, singleLine: SingleLineBool): (DelimFinishReason, seq[MarggersElement]) {.gcsafe.} =
# DelimParser
var
escaped = false
Expand Down Expand Up @@ -161,7 +161,7 @@ proc parseDelimed*(parser; options; delim: string, singleLine: SingleLineBool):
check(pat) and (parser.pos += matchLen; true)

proc parseAux(tag: KnownTags, del: string, parser: var MarggersParser,
acceptedReasons = {frDone}): DelimFinishReason =
acceptedReasons = {frDone}): DelimFinishReason {.gcsafe.} =
let currentPos = parser.pos
let (finishReason, parsedElems) = parseDelimed(parser, options, del, singleLine)
if finishReason in acceptedReasons:
Expand Down

0 comments on commit d7fd803

Please sign in to comment.