[gtk+/wip/otte/shader: 4/52] gskslstatement: Print semicolon in the statement print function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/shader: 4/52] gskslstatement: Print semicolon in the statement print function
- Date: Mon, 9 Oct 2017 16:52:25 +0000 (UTC)
commit ea5737c5f803531d9eb26a38e19c17e004bfd3b0
Author: Benjamin Otte <otte redhat com>
Date: Sat Sep 30 15:04:51 2017 +0200
gskslstatement: Print semicolon in the statement print function
This is necessary for compound statements which don't have a semicolon.
gsk/gskslfunction.c | 1 -
gsk/gskslstatement.c | 4 ++++
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gsk/gskslfunction.c b/gsk/gskslfunction.c
index 7b7579c..e1ad10a 100644
--- a/gsk/gskslfunction.c
+++ b/gsk/gskslfunction.c
@@ -384,7 +384,6 @@ gsk_sl_function_declared_print (const GskSlFunction *function,
{
gsk_sl_printer_newline (printer);
gsk_sl_statement_print (l->data, printer);
- gsk_sl_printer_append (printer, ";");
}
gsk_sl_printer_pop_indentation (printer);
gsk_sl_printer_newline (printer);
diff --git a/gsk/gskslstatement.c b/gsk/gskslstatement.c
index f4f07fe..728718e 100644
--- a/gsk/gskslstatement.c
+++ b/gsk/gskslstatement.c
@@ -88,6 +88,7 @@ static void
gsk_sl_statement_empty_print (const GskSlStatement *statement,
GskSlPrinter *printer)
{
+ gsk_sl_printer_append (printer, ";");
}
static guint32
@@ -138,6 +139,7 @@ gsk_sl_statement_declaration_print (const GskSlStatement *statement,
gsk_sl_printer_append (printer, " = ");
gsk_sl_expression_print (declaration->initial, printer);
}
+ gsk_sl_printer_append (printer, ";");
}
static guint32
@@ -200,6 +202,7 @@ gsk_sl_statement_return_print (const GskSlStatement *statement,
gsk_sl_printer_append (printer, " ");
gsk_sl_expression_print (return_statement->value, printer);
}
+ gsk_sl_printer_append (printer, ";");
}
static guint32
@@ -244,6 +247,7 @@ gsk_sl_statement_expression_print (const GskSlStatement *statement,
GskSlStatementExpression *expression_statement = (GskSlStatementExpression *) statement;
gsk_sl_expression_print (expression_statement->expression, printer);
+ gsk_sl_printer_append (printer, ";");
}
static guint32
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]