]> git.sur5r.net Git - i3/i3/commitdiff
lexer: return HEX instead of NUMBER when parsing colors
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 19 Sep 2009 17:34:02 +0000 (19:34 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 19 Sep 2009 17:34:02 +0000 (19:34 +0200)
src/cfgparse.l

index 2332055abfcdee5271ba98aecf4bde9d8cc07f39..c319137bc6c3c4be6fda971e3fc6b4243f2b87ab 100644 (file)
@@ -18,8 +18,8 @@
 %%
 <BIND_A2WS_COND>[^\n]+          { BEGIN(INITIAL); yylval.string = strdup(yytext); return STR; }
 ^#[^\n]*                        { return TOKCOMMENT; }
-[0-9]+                          { yylval.number = atoi(yytext); return NUMBER; }
 <COLOR_COND>[0-9a-fA-F]+        { yylval.string = strdup(yytext); return HEX; }
+[0-9]+                          { yylval.number = atoi(yytext); return NUMBER; }
 bind                            { BEGIN(BIND_COND); return TOKBIND; }
 bindsym                         { BEGIN(BIND_COND); return TOKBINDSYM; }
 floating_modifier               { return TOKFLOATING_MODIFIER; }