aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-09-12 16:04:02 +0100
committergingerBill <bill@gingerbill.org>2020-09-12 16:04:02 +0100
commit1fd1203d8bf1977366dbf1f366623924e5c3e5c0 (patch)
treee7fdd00bba79f675168db687f91990532c5645e2 /src/parser.cpp
parentccb7c3513bf8f149eb46e8d698ace0d08621bf4f (diff)
Improve error message for multi-valued global declarations not be allowed
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 3e6375321..868291177 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2835,7 +2835,12 @@ Ast *parse_value_decl(AstFile *f, Array<Ast *> names, CommentGroup *docs) {
if (f->curr_proc == nullptr) {
if (values.count > 0 && names.count != values.count) {
- syntax_error(values[0], "Expected %td expressions on the right hand side, got %td", names.count, values.count);
+ syntax_error(
+ values[0],
+ "Expected %td expressions on the right hand side, got %td\n"
+ "\tNote: Global declarations do not allow for multi-valued expressions",
+ names.count, values.count
+ );
}
}