mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-26 22:57:24 +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}
|
return {type = "OutputFormat", value = format}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function functioncall (name, args)
|
local function functioncall (str, name, args)
|
||||||
return {type = "FunctionCall", name = name, arguments = args}
|
return {type = "FunctionCall", name = name, arguments = args, source = str}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function rule(filter, output)
|
local function rule(filter, output)
|
||||||
@ -217,7 +217,7 @@ local G = {
|
|||||||
MacroDef = (C(V"Macro") * V"Skip" * V"Colon" * (V"Filter"));
|
MacroDef = (C(V"Macro") * V"Skip" * V"Colon" * (V"Filter"));
|
||||||
|
|
||||||
FuncArgs = symb("(") * list(V"Value", symb(",")) * symb(")");
|
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
|
-- Terminals
|
||||||
Value = terminal "Number" + terminal "String" + terminal "BareString";
|
Value = terminal "Number" + terminal "String" + terminal "BareString";
|
||||||
|
Loading…
Reference in New Issue
Block a user