From 57a17a708bec7d3e313e4740371dccaea7bd3222 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 4 Aug 2021 00:10:41 +0100 Subject: Improve core:odin/parser --- src/parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index fbd6cf0f7..677db1dad 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2169,7 +2169,7 @@ Ast *parse_operand(AstFile *f, bool lhs) { if (build_context.disallow_do) { syntax_error(body, "'do' has been disallowed"); } else if (!ast_on_same_line(type, body)) { - syntax_error(body, "The body of a 'do' be on the same line as the signature"); + syntax_error(body, "The body of a 'do' must be on the same line as the signature"); } return ast_proc_lit(f, type, body, tags, where_token, where_clauses); @@ -3840,7 +3840,7 @@ Ast *parse_if_stmt(AstFile *f) { else_stmt = convert_stmt_to_body(f, parse_stmt(f)); if (build_context.disallow_do) { syntax_error(else_stmt, "'do' has been disallowed"); - } else if (!ast_on_same_line(else_stmt, else_stmt)) { + } else if (!ast_on_same_line(else_token, else_stmt)) { syntax_error(else_stmt, "The body of a 'do' be on the same line as 'else'"); } } break; -- cgit v1.2.3