diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-12-31 22:47:22 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-12-31 22:47:22 +0100 |
commit | 068592414e6993274c37e894acaf4d371600ddaf (patch) | |
tree | 3e39db192f95c2f2ed3d3ed98921bac22468777b /lexer/theme-lexer.l | |
parent | 5f424fa598662e35f647b99c9e7755ffecb451ad (diff) |
Support em format in padding
Diffstat (limited to 'lexer/theme-lexer.l')
-rw-r--r-- | lexer/theme-lexer.l | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index 0cf11f66..1288e07b 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -25,6 +25,7 @@ STRING [[:print:]]+ HEX [[:xdigit:]] NUMBER [[:digit:]] PX (px) +EM (em) NEWLINES (\r|\n)+ %x PROPERTIES @@ -106,7 +107,13 @@ if ( queue == NULL ){ <PROPERTIES>\"{STRING}\" { yytext[yyleng-1] = '\0'; yylval->sval = g_strdup(&yytext[1]); return T_STRING;} <PROPERTIES>{NUMBER}+{PX} { - yylval->ival = (int)g_ascii_strtoll(yytext, NULL, 10); + yylval->distance.distance = (int)g_ascii_strtoll(yytext, NULL, 10); + yylval->distance.type = PW_PX; + return T_PIXEL; +} +<PROPERTIES>{NUMBER}+{EM} { + yylval->distance.distance = (int)g_ascii_strtoll(yytext, NULL, 10); + yylval->distance.type = PW_EM; return T_PIXEL; } <PROPERTIES>#{HEX}{8} { |