Skip to content

Commit 56bab65

Browse files
authored
fix(lua): Ignore accessor with empty parameters
This will now not match `AccessorFunc()` and `AccessorFuncDT()` . (nothing, not even whitespace in between the parentheses) While this is still not perfect it prevents matching these in string literals in lua code files.
1 parent 1e84f65 commit 56bab65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/DataStructures/Lua/Accessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class Accessor : DataStructure
88
{
99
public override Regex GetRegex()
1010
{
11-
return new Regex(@"\s*AccessorFunc(DT)?\s*\("); // RegEx matches "hook.Run(" or "hook.Call("
11+
return new Regex(@"\s*AccessorFunc(DT)?\s*\((\w|,|\s)+\)"); // RegEx matches "hook.Run(" or "hook.Call("
1212
}
1313

1414
public override bool CheckMatch(string line)

0 commit comments

Comments
 (0)