From d7fd803fb781396e665b2aa5b8127b26ab176b90 Mon Sep 17 00:00:00 2001 From: metagn <10591326+metagn@users.noreply.github.com> Date: Wed, 16 Aug 2023 18:23:49 +0300 Subject: [PATCH] fix recursive gcsafe issue --- src/marggers/parser.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/marggers/parser.nim b/src/marggers/parser.nim index 480aec8..4c55300 100644 --- a/src/marggers/parser.nim +++ b/src/marggers/parser.nim @@ -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 @@ -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: