[gtk+/wip/otte/shader: 145/150] gsksl: Don't pass matcher to function argument parser
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/shader: 145/150] gsksl: Don't pass matcher to function argument parser
- Date: Sat, 21 Oct 2017 02:38:22 +0000 (UTC)
commit 3bfd34db2a80ee134ec5875a0014e1b39d4ffa71
Author: Benjamin Otte <otte redhat com>
Date: Tue Oct 17 20:00:51 2017 +0200
gsksl: Don't pass matcher to function argument parser
... when an error has occured. That way we avoid duplicate error
messages for nonexisting functions.
gsk/gskslexpression.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gsk/gskslexpression.c b/gsk/gskslexpression.c
index 900fe54..91ad58f 100644
--- a/gsk/gskslexpression.c
+++ b/gsk/gskslexpression.c
@@ -1981,9 +1981,12 @@ gsk_sl_expression_parse_primary (GskSlScope *scope,
gsk_sl_scope_match_function (scope, &matcher, name);
if (!gsk_sl_function_matcher_has_matches (&matcher))
- gsk_sl_preprocessor_error (stream, DECLARATION, "No function named \"%s\".", name);
-
- expr = gsk_sl_expression_parse_function_call (scope, stream, &matcher);
+ {
+ gsk_sl_preprocessor_error (stream, DECLARATION, "No function named \"%s\".", name);
+ expr = gsk_sl_expression_parse_function_call (scope, stream, NULL);
+ }
+ else
+ expr = gsk_sl_expression_parse_function_call (scope, stream, &matcher);
gsk_sl_function_matcher_finish (&matcher);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]