css parser: Add gtk_css_parser_skip_whitespace

Does what it says.
This commit is contained in:
Matthias Clasen 2024-05-09 21:42:39 -04:00 committed by Alice Mikhaylenko
parent 7775bcf2fb
commit 7eca32edf0
2 changed files with 14 additions and 0 deletions

View File

@ -612,6 +612,19 @@ gtk_css_parser_skip_until (GtkCssParser *self,
}
}
void
gtk_css_parser_skip_whitespace (GtkCssParser *self)
{
const GtkCssToken *token;
for (token = gtk_css_parser_peek_token (self);
gtk_css_token_is (token, GTK_CSS_TOKEN_WHITESPACE);
token = gtk_css_parser_peek_token (self))
{
gtk_css_parser_consume_token (self);
}
}
void
gtk_css_parser_emit_error (GtkCssParser *self,
const GtkCssLocation *start,

View File

@ -89,6 +89,7 @@ void gtk_css_parser_end_block (GtkCssParser
void gtk_css_parser_skip (GtkCssParser *self);
void gtk_css_parser_skip_until (GtkCssParser *self,
GtkCssTokenType token_type);
void gtk_css_parser_skip_whitespace (GtkCssParser *self);
void gtk_css_parser_emit_error (GtkCssParser *self,
const GtkCssLocation *start,