summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 0ee8b8a..a4a5b2b 100644
--- a/parse.c
+++ b/parse.c
@@ -670,7 +670,10 @@ static bool parse_expr(Parser *p, Expression *e, Token *end) {
return false;
if (t->token != end) {
- tokr_err(t, "Direct function calling in an expression is not supported.\nYou can wrap the function in parentheses.");
+ if (token_is_kw(t->token, KW_LPAREN))
+ tokr_err(t, "Direct function calling in an expression is not supported.\nYou can wrap the function in parentheses.");
+ else
+ tokr_err(t, "Expected end of expression.");
return false;
}
return true;