mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-26 14:52:20 +00:00
compiler: keep source in FunctionCall ASTs
This commit is contained in:
parent
55b2490314
commit
1b7a5bd119
@ -167,8 +167,8 @@ local function outputformat (format)
|
||||
return {type = "OutputFormat", value = format}
|
||||
end
|
||||
|
||||
local function functioncall (name, args)
|
||||
return {type = "FunctionCall", name = name, arguments = args}
|
||||
local function functioncall (str, name, args)
|
||||
return {type = "FunctionCall", name = name, arguments = args, source = str}
|
||||
end
|
||||
|
||||
local function rule(filter, output)
|
||||
@ -217,7 +217,7 @@ local G = {
|
||||
MacroDef = (C(V"Macro") * V"Skip" * V"Colon" * (V"Filter"));
|
||||
|
||||
FuncArgs = symb("(") * list(V"Value", symb(",")) * symb(")");
|
||||
Output = ((V"Name" * V"FuncArgs") / functioncall) + P(1)^0 / outputformat;
|
||||
Output = (C(V"Name" * V"FuncArgs") / functioncall) + P(1)^0 / outputformat;
|
||||
|
||||
-- Terminals
|
||||
Value = terminal "Number" + terminal "String" + terminal "BareString";
|
||||
|
Loading…
Reference in New Issue
Block a user