diff options
author | Dave Davenport <qball@gmpclient.org> | 2020-04-24 18:17:01 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2020-04-24 18:17:01 +0200 |
commit | 81b00705e848d6968f8462d64f2e8035b7593804 (patch) | |
tree | 523506cae7120bc80c1234c94c1f0a4e1cd66bc6 /lexer/theme-parser.y | |
parent | fc727fef91eb276d8b9a1cf8ed8f5934ae209f59 (diff) |
[Theme] Add modulo to calc.i1088
Diffstat (limited to 'lexer/theme-parser.y')
-rw-r--r-- | lexer/theme-parser.y | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y index 1da0bda0..c93e8c7f 100644 --- a/lexer/theme-parser.y +++ b/lexer/theme-parser.y @@ -211,10 +211,10 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b) %token T_LIST_OPEN "List open ('[')" %token T_LIST_CLOSE "List close (']')" -%token T_MODIFIER_ADD "Add ('+')" -%token T_MODIFIER_SUBTRACT "Subtract ('-')" -%token T_MODIFIER_DIVIDE "Divide ('/')" -%token T_MODIFIER_MULTIPLY "Multiply ('*')" +%token T_MODIFIER_ADD "Add ('+')" +%token T_MODIFIER_SUBTRACT "Subtract ('-')" +%token T_MODIFIER_DIVIDE "Divide ('/')" +%token T_MODIFIER_MULTIPLY "Multiply ('*')" %token T_CALC "calc" @@ -672,6 +672,12 @@ t_property_distance_unit_math $$->right = $3; $$->modtype = ROFI_DISTANCE_MODIFIER_DIVIDE; } +| t_property_distance_unit_math T_PERCENT t_property_distance_unit { + $$ = g_slice_new0(RofiDistanceUnit); + $$->left = $1; + $$->right = $3; + $$->modtype = ROFI_DISTANCE_MODIFIER_MODULO; +} | t_property_distance_unit { $$ = $1; }; |