From d759e3b94225f59bfd6a7ae276b23701dddd79bc Mon Sep 17 00:00:00 2001 From: Henri DF Date: Mon, 22 Feb 2016 16:01:40 -0800 Subject: [PATCH] Fix macro expansion bug introduced with Rules --- userspace/digwatch/lua/compiler.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/userspace/digwatch/lua/compiler.lua b/userspace/digwatch/lua/compiler.lua index d4ae127a..08e554a0 100644 --- a/userspace/digwatch/lua/compiler.lua +++ b/userspace/digwatch/lua/compiler.lua @@ -336,7 +336,9 @@ end --]] function expand_macros(node, defs, changed) - if node.type == "Filter" then + if (node.type == "Rule") then + macros = expand_macros(node.filter, defs, changed) + elseif node.type == "Filter" then if (node.value.type == "Macro") then if (defs[node.value.value] == nil) then tostring = require 'ml'.tstring @@ -344,6 +346,7 @@ function expand_macros(node, defs, changed) end node.value = defs[node.value.value] changed = true + return changed end return expand_macros(node.value, defs, changed)