Skip to content

Commit 9c75565

Browse files
fix: tailcall annotation error
1 parent 79d140a commit 9c75565

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/graphql_compiler/graphql_parser_schema.ml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,16 @@ let parse_enum ~description parser =
129129
| { item = Graphql_lexer.String description } -> (
130130
let _ = next parser in
131131
match parse_enum_value ~description:(Some description) parser with
132-
| Ok value -> consume_enums (value :: acc)
132+
| Ok value -> (consume_enums [@tailcall]) (value :: acc)
133133
| Error e -> Error e)
134134
| { item = Graphql_lexer.Name _ } -> (
135135
match parse_enum_value ~description:None parser with
136-
| Ok value -> consume_enums (value :: acc)
136+
| Ok value -> (consume_enums [@tailcall]) (value :: acc)
137137
| Error e -> Error e)
138138
| { item = Graphql_lexer.Curly_close } ->
139139
let _ = next parser in
140140
Ok (List.rev acc)
141141
| { item; span } -> Error { span; item = Unexpected_token item }
142-
[@@tailcall]
143142
in
144143
let em_values = consume_enums [] in
145144
em_values
@@ -290,10 +289,9 @@ let rec parse_union_types ?(acc = []) parser =
290289
match (acc, pipe) with
291290
| _, Ok (Some _) | [], Ok None -> (
292291
match expect_name parser with
293-
| Ok union -> parse_union_types ~acc:(union.item :: acc) parser
292+
| Ok union -> (parse_union_types [@tailcall]) ~acc:(union.item :: acc) parser
294293
| Error e -> Error e)
295294
| _, _ -> Ok (List.rev acc)
296-
[@@tailcall]
297295

298296
let parse_union ~description parser =
299297
expect_name parser

0 commit comments

Comments
 (0)