aboutsummaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/name_analysis.cc3
-rw-r--r--boot/parser.yy7
-rw-r--r--boot/type_check.cc2
3 files changed, 7 insertions, 5 deletions
diff --git a/boot/name_analysis.cc b/boot/name_analysis.cc
index 11380db..9305cd2 100644
--- a/boot/name_analysis.cc
+++ b/boot/name_analysis.cc
@@ -1628,8 +1628,7 @@ namespace elna::boot
this->bag.leave();
info_object->parameters = type_parameters;
info_object->exported = declaration->identifier.exported();
- info_object->position.emplace(declaration->position().start(),
- declaration->heading().position().end());
+ info_object->position.emplace(declaration->position());
info_object->file = this->module_file;
info_object->noreturn = noreturn;
diff --git a/boot/parser.yy b/boot/parser.yy
index fa701ec..c4e514b 100644
--- a/boot/parser.yy
+++ b/boot/parser.yy
@@ -328,12 +328,15 @@ procedure_heading:
procedure_declaration:
"proc" identifier_definition procedure_heading procedure_body
{
- $$ = new boot::procedure_declaration(boot::make_position(@$),
+ $$ = new boot::procedure_declaration(
+ boot::make_position(yy::location(@1.begin, @3.end)),
std::move(*$2), $3, std::move(*$4));
}
| "proc" identifier_definition procedure_heading "extern"
{
- $$ = new boot::procedure_declaration(boot::make_position(@$), std::move(*$2), $3);
+ $$ = new boot::procedure_declaration(
+ boot::make_position(yy::location(@1.begin, @3.end)),
+ std::move(*$2), $3);
}
call_expression:
designator_expression actual_parameter_list
diff --git a/boot/type_check.cc b/boot/type_check.cc
index 14a5099..7adaaed 100644
--- a/boot/type_check.cc
+++ b/boot/type_check.cc
@@ -198,7 +198,7 @@ namespace elna::boot
+ this->actual.to_string() + "'";
}
return describe_callable(payload.identifier)
- + " is expected to return, but does not have a return statement";
+ + " is expected to return a value, but has no return expression";
}
else if constexpr (std::is_same_v<T, unary>)