[gtk/wip/otte/css: 55/66] cssparser: Pass in error locations explicitly
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/css: 55/66] cssparser: Pass in error locations explicitly
- Date: Thu, 11 Apr 2019 22:45:15 +0000 (UTC)
commit 2acb6587f336a30610b9efa5f818491c215faa2d
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 10 18:16:10 2019 +0200
cssparser: Pass in error locations explicitly
And for the quick function, use the start/end location of the current
token.
gtk/css/gtkcssparser.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/css/gtkcssparser.c b/gtk/css/gtkcssparser.c
index 06553f036c..0043b83bbd 100644
--- a/gtk/css/gtkcssparser.c
+++ b/gtk/css/gtkcssparser.c
@@ -510,8 +510,8 @@ gtk_css_parser_error_syntax (GtkCssParser *self,
GTK_CSS_PARSER_ERROR_SYNTAX,
format, args);
gtk_css_parser_emit_error (self,
- &self->location,
- gtk_css_tokenizer_get_location (self->tokenizer),
+ gtk_css_parser_get_start_location (self),
+ gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
@@ -530,8 +530,8 @@ gtk_css_parser_error_value (GtkCssParser *self,
GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
format, args);
gtk_css_parser_emit_error (self,
- &self->location,
- gtk_css_tokenizer_get_location (self->tokenizer),
+ gtk_css_parser_get_start_location (self),
+ gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
@@ -550,8 +550,8 @@ gtk_css_parser_error_import (GtkCssParser *self,
GTK_CSS_PARSER_ERROR_IMPORT,
format, args);
gtk_css_parser_emit_error (self,
- &self->location,
- gtk_css_tokenizer_get_location (self->tokenizer),
+ gtk_css_parser_get_start_location (self),
+ gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
@@ -570,8 +570,8 @@ gtk_css_parser_warn_syntax (GtkCssParser *self,
GTK_CSS_PARSER_WARNING_SYNTAX,
format, args);
gtk_css_parser_emit_error (self,
- &self->location,
- gtk_css_tokenizer_get_location (self->tokenizer),
+ gtk_css_parser_get_start_location (self),
+ gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]