aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-04 00:10:41 +0100
committergingerBill <bill@gingerbill.org>2021-08-04 00:10:41 +0100
commit57a17a708bec7d3e313e4740371dccaea7bd3222 (patch)
treebde7d7e5f1a1e824f065c201ceb1c200899310be /src/parser.cpp
parent1f79082921b5f1e530b013b7b63a5f50f2bc7e7d (diff)
Improve core:odin/parser
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 2 insertions, 2 deletions
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;