@@ -106,7 +106,7 @@ method match(self: Pattern, left: seq[Pattern],
106
106
collected: seq [Pattern] = @ []) : MatchResult {.base.} =
107
107
assert false
108
108
109
- method fix_identities(self: Pattern, uniq: seq [Pattern]) {.base.} =
109
+ method fix_identities(self: Pattern, uniq: seq [Pattern]) {.base, gcsafe .} =
110
110
# # Make pattern-tree tips point to same object if they are equal.
111
111
if self.children.is_nil:
112
112
return
@@ -426,7 +426,7 @@ proc parse_shorts(tokens: TokenStream, options: var seq[Option]): seq[Pattern] =
426
426
result .add o
427
427
428
428
429
- proc parse_expr(tokens: TokenStream, options: var seq [Option]) : seq [Pattern]
429
+ proc parse_expr(tokens: TokenStream, options: var seq [Option]) : seq [Pattern] {.gcsafe.}
430
430
431
431
proc parse_pattern(source: string , options: var seq [Option]) : Required =
432
432
var tokens = token_stream(
@@ -440,7 +440,7 @@ proc parse_pattern(source: string, options: var seq[Option]): Required =
440
440
required(ret)
441
441
442
442
443
- proc parse_seq(tokens: TokenStream, options: var seq [Option]) : seq [Pattern]
443
+ proc parse_seq(tokens: TokenStream, options: var seq [Option]) : seq [Pattern] {.gcsafe.}
444
444
445
445
proc parse_expr(tokens: TokenStream, options: var seq [Option]) : seq [Pattern] =
446
446
# # expr ::= seq ( '|' seq )* ;
@@ -456,7 +456,7 @@ proc parse_expr(tokens: TokenStream, options: var seq[Option]): seq[Pattern] =
456
456
457
457
458
458
459
- proc parse_atom(tokens: TokenStream, options: var seq [Option]) : seq [Pattern]
459
+ proc parse_atom(tokens: TokenStream, options: var seq [Option]) : seq [Pattern] {.gcsafe.}
460
460
461
461
proc parse_seq(tokens: TokenStream, options: var seq [Option]) : seq [Pattern] =
462
462
# # seq ::= ( atom [ '...' ] )* ;
@@ -601,7 +601,7 @@ proc docopt_exc(doc: string, argv: seq[string], help: bool, version: string,
601
601
602
602
proc docopt*(doc: string , argv: seq [string ] = nil, help = true,
603
603
version: string = nil, options_first = false, quit = true
604
- ): Table[string , Value] =
604
+ ): Table[string , Value] {.gcsafe.} =
605
605
## Parse `argv` based on command-line interface described in `doc`.
606
606
##
607
607
## `docopt` creates your command-line interface based on its
0 commit comments