/*
* Hic Est Leo -- MapCSS Parser
*
- * (c) 2014 Martin Mares <mj@ucw.cz>
+ * (c) 2014--2015 Martin Mares <mj@ucw.cz>
*/
%{
#include "leo.h"
#include "css.h"
+#include "expr.h"
static void *css_alloc(size_t n)
{
%token LE GE NE CC
%token SINGLE_PROP
-%token <s> NUMBER IDENT QUOTED RGB
+%token <s> NUMBER IDENT QUOTED RGB LUA
%type <s> ident_or_quoted
%type <rule> rule rule_start rule_selectors rule_start_actions rule_actions
ident_or_quoted ':' prop_value
{
$$ = css_alloc(sizeof(struct css_action));
+ $$->type = CSS_ACTION_SET;
$$->prop = $3;
$$->prop.key = style_prop_encode($1);
}
+ | LUA
+ {
+ $$ = css_alloc(sizeof(struct css_action));
+ $$->type = CSS_ACTION_EXPR;
+ expr_compile($$, $1);
+ }
;
prop_value: