Fix @return? parsing.

This commit is contained in:
Christoffer Lerno
2025-03-13 11:03:19 +01:00
parent b8ae2b06d6
commit ae76839347

View File

@@ -2709,7 +2709,7 @@ static inline bool parse_doc_optreturn(ParseContext *c, AstId *docs, AstId **doc
Ast **returns = NULL;
Ast *ast = ast_new_curr(c, AST_CONTRACT);
ast->span = c->prev_span;
advance_and_verify(c, TOKEN_BANG);
advance_and_verify(c, TOKEN_QUESTION);
ast->contract_stmt.kind = CONTRACT_OPTIONALS;
while (1)
{