mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
[DSL] Move theme reset into the grammer parser and out of lexer.
This commit is contained in:
parent
3950204760
commit
eb602b34fa
2 changed files with 9 additions and 1 deletions
|
@ -339,9 +339,10 @@ if ( queue == NULL ){
|
|||
BEGIN(INCLUDE);
|
||||
}
|
||||
<INITIAL>{THEME} {
|
||||
rofi_theme_reset();
|
||||
//rofi_theme_reset();
|
||||
g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) );
|
||||
BEGIN(INCLUDE);
|
||||
return T_RESET_THEME;
|
||||
}
|
||||
/** Skip all whitespace */
|
||||
<INCLUDE>{WHITESPACE} {}
|
||||
|
|
|
@ -237,6 +237,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b)
|
|||
%token T_WHITESPACE "White space"
|
||||
%token T_PDEFAULTS "Default settings section ( '* { ... }')"
|
||||
%token T_CONFIGURATION "Configuration block"
|
||||
%token T_RESET_THEME "Reset Theme"
|
||||
|
||||
%token T_COLOR_TRANSPARENT "Transparent"
|
||||
|
||||
|
@ -322,6 +323,12 @@ t_entry_list:
|
|||
%empty {
|
||||
$$ = g_slice_new0 ( ThemeWidget );
|
||||
}
|
||||
| t_entry_list T_RESET_THEME {
|
||||
rofi_theme_reset();
|
||||
rofi_theme_free($1);
|
||||
$$ = g_slice_new0 ( ThemeWidget );
|
||||
}
|
||||
|
||||
| t_entry_list t_name_prefix_optional t_entry_name_path_selectors T_BOPEN t_property_list_optional T_BCLOSE
|
||||
{
|
||||
for ( GList *liter = g_list_first ( $3); liter; liter = g_list_next ( liter ) ) {
|
||||
|
|
Loading…
Reference in a new issue