diff options
author | Dave Davenport <qball@blame.services> | 2022-05-12 19:52:35 +0200 |
---|---|---|
committer | Dave Davenport <qball@blame.services> | 2022-05-12 19:52:35 +0200 |
commit | 141bd3d197c405c0cabd7b6d76b8105ffd514094 (patch) | |
tree | 0923e659fb504a70eb8394786e7167da72ae8756 /lexer | |
parent | fc6426534351fdcb0fa15d7d5f5aa17f29726c65 (diff) |
[Doc][Config] Update documentation for new fallback icon
* Allow multiple config be combined.
Diffstat (limited to 'lexer')
-rw-r--r-- | lexer/theme-lexer.l | 3 | ||||
-rw-r--r-- | lexer/theme-parser.y | 22 |
2 files changed, 17 insertions, 8 deletions
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index 1439bc51..416f1e84 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -489,7 +489,7 @@ if ( queue == NULL ) { } <NAMESTR>\.|{WHITESPACE} { return T_NSEP; } -<NAMESTR>,{WHITESPACE}* { return T_SSEP; } +<NAMESTR,SECTION>,{WHITESPACE}* { return T_SSEP; } /* Alias color to text-color */ <SECTION>"color" { yylval->sval = g_strdup("text-color"); return T_PROP_NAME;} <SECTION>{WORD} { yylval->sval = g_strdup(yytext); return T_PROP_NAME;} @@ -820,7 +820,6 @@ if ( queue == NULL ) { } <SECTION>. { yytext[yyleng-1] = '\0'; - fprintf(stderr,"section found: |%s|\n", yytext); return T_ERROR_SECTION; } <PROPERTIES_ARRAY,PROPERTIES_VAR>{WORD_ELEMENT} { diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y index 33323dcd..8f1721e4 100644 --- a/lexer/theme-parser.y +++ b/lexer/theme-parser.y @@ -278,6 +278,7 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b ) %type <theme> t_entry_list %type <theme> t_entry_list_included %type <list> t_entry_name_path +%type <list> t_property_name_list %type <list> t_entry_name_path_selectors %type <list> t_color_list %type <property> t_property @@ -459,16 +460,19 @@ t_config_property // We don't keep any reference to this after this point, so the property can be free'ed. rofi_theme_property_free ( $1 ); } -| t_property_name T_BOPEN t_property_list_optional T_BCLOSE +| t_property_name_list T_BOPEN t_property_list_optional T_BCLOSE { - ThemeWidget *widget = rofi_configuration; - widget = rofi_theme_find_or_create_name ( widget, $1 ); - widget->set = TRUE; - rofi_theme_widget_add_properties ( widget, $3); + + for ( GList *iter = g_list_first( $1) ; iter; iter = g_list_next(iter)){ + ThemeWidget *widget = rofi_configuration; + widget = rofi_theme_find_or_create_name ( widget, iter->data ); + widget->set = TRUE; + rofi_theme_widget_add_properties ( widget, $3); + } if ( $3 ) { g_hash_table_destroy ( $3 ); } - g_free ( $1 ); + g_list_free_full ( $1, g_free ); } ; @@ -1049,5 +1053,11 @@ T_NAME_ELEMENT { $$ = g_list_append ( NULL, $1 );} | t_entry_name_path T_NSEP { $$ = $1; } ; +t_property_name_list: +t_property_name { $$ = g_list_append ( NULL, $1 );} +| t_property_name_list T_SSEP t_property_name { $$ = g_list_append ( $1, $3);} +; + + %% |