diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-09-26 00:42:13 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-02-22 23:12:41 +0100 |
commit | 13a25e4386456d30cae07334ccb771043e216e8e (patch) | |
tree | 25bd4c183a152340b3b072b35e471f23ed8ce465 /filter | |
parent | e7a3efd842dc8626e93c34af99f61a3880bf87f2 (diff) |
Lua: Allow evaluation in globals
Diffstat (limited to 'filter')
-rw-r--r-- | filter/config.Y | 1 | ||||
-rw-r--r-- | filter/filter.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/filter/config.Y b/filter/config.Y index 3c4d8db6..6004c961 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -453,6 +453,7 @@ filter_def: conf: filter_eval ; filter_eval: EVAL term { f_eval_int($2); } + | EVAL LUA constant { lua_eval($3); } ; conf: custom_attr ; diff --git a/filter/filter.h b/filter/filter.h index b49c4c43..2b1176dc 100644 --- a/filter/filter.h +++ b/filter/filter.h @@ -320,5 +320,6 @@ extern void (*bt_assert_hook)(int result, struct f_inst *assert); struct filter * lua_new_filter(struct f_inst *inst); struct f_val lua_interpret(struct lua_filter_chunk *chunk, struct rte **e, struct rta **a, struct ea_list **ea, struct linpool *lp, int flags); int lua_filter_same(struct lua_filter_chunk *new, struct lua_filter_chunk *old); +uint lua_eval(struct f_inst *inst); #endif |