[gtk+/parser: 35/66] cssprovider: Don't fail with invalid syntax when parsing a value
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/parser: 35/66] cssprovider: Don't fail with invalid syntax when parsing a value
- Date: Mon, 11 Apr 2011 22:32:05 +0000 (UTC)
commit 25fae7621f03f46723383027688d1d2acd654ab0
Author: Benjamin Otte <otte redhat com>
Date: Fri Apr 8 17:17:27 2011 +0200
cssprovider: Don't fail with invalid syntax when parsing a value
Instead, raise a PROPERTY_VALUE error, find the next semicolon or
closing bracket and resume parsing.
gtk/gtkcssprovider.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index bfebb33..e61042d 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2386,8 +2386,12 @@ parse_rule (GtkCssProvider *css_provider,
if (scanner->token != G_TOKEN_IDENTIFIER)
{
g_free (prop);
- gtk_css_provider_invalid_token (css_provider, "Property value");
- return G_TOKEN_IDENTIFIER;
+ gtk_css_provider_error (css_provider,
+ GTK_CSS_PROVIDER_ERROR,
+ GTK_CSS_PROVIDER_ERROR_PROPERTY_VALUE,
+ "Could not parse property value");
+ css_provider_pop_scope (css_provider);
+ goto find_end_of_declaration;
}
value_str = scanner->value.v_identifier;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]