[template-glib] expr-parser.y: fix ordering when adding to stmt list
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [template-glib] expr-parser.y: fix ordering when adding to stmt list
- Date: Thu, 5 May 2022 00:51:50 +0000 (UTC)
commit 1ecfbfdbd308f851cc41011a0155066e025ba24f
Author: Christian Hergert <chergert redhat com>
Date: Wed May 4 17:42:20 2022 -0700
expr-parser.y: fix ordering when adding to stmt list
src/tmpl-expr-parser.y | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/tmpl-expr-parser.y b/src/tmpl-expr-parser.y
index 0bbde8c..aaccc13 100644
--- a/src/tmpl-expr-parser.y
+++ b/src/tmpl-expr-parser.y
@@ -54,10 +54,13 @@ add_expr_to_parser (TmplExprParser *parser,
{
GPtrArray *ar = g_ptr_array_new_with_free_func ((GDestroyNotify)tmpl_expr_unref);
g_ptr_array_add (ar, parser->ast);
+ g_ptr_array_add (ar, node);
parser->ast = tmpl_expr_new_stmt_list (ar);
}
-
- g_ptr_array_add (parser->ast->stmt_list.stmts, node);
+ else
+ {
+ g_ptr_array_add (parser->ast->stmt_list.stmts, node);
+ }
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]