From 4622614784fb113882607e04360011c9a63508bb Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 8 Apr 2011 00:18:38 +0200 Subject: [PATCH] cssprovider: use INVALID_SYNTAX for unexpected token error --- gtk/gtkcssprovider.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index e0a42c734f..e04d7392dc 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1633,7 +1633,7 @@ gtk_css_provider_invalid_token (GtkCssProvider *provider, { gtk_css_provider_error (provider, GTK_CSS_PROVIDER_ERROR, - GTK_CSS_PROVIDER_ERROR_FAILED, + GTK_CSS_PROVIDER_ERROR_SYNTAX, "expected a valid %s", expected); } @@ -3657,10 +3657,12 @@ parse_rule (GtkCssProvider *css_provider, find_end_of_declaration: while (scanner->token != ';' && - scanner->token != G_TOKEN_RIGHT_CURLY) + scanner->token != G_TOKEN_RIGHT_CURLY && + scanner->token != G_TOKEN_EOF) g_scanner_get_next_token (scanner); - if (scanner->token == G_TOKEN_RIGHT_CURLY) + if (scanner->token == G_TOKEN_RIGHT_CURLY || + scanner->token == G_TOKEN_EOF) break; g_scanner_get_next_token (scanner);