Skip to content

Commit 6ddb6a1

Browse files
committed
fix(lua): allow match on ... in function signature
1 parent 90bb383 commit 6ddb6a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/DataStructures/Lua/Function.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class Function : DataStructure
1919
public override Regex GetRegex()
2020
{
2121
// RegEx matches "@function opt.name(param, opt)" or "local function opt:name()"
22-
return new Regex(@"((local\s+)?|@)function\s*\w+((\.|\:)\w+)?\s*\((\s*\w+\s*(,\s*\w+\s*)*)?\)");
22+
return new Regex(@"((local\s+)?|@)function\s*\w+((\.|\:)\w+)?\s*\((\s*\w+\s*(,\s*(\w+|\.\.\.)\s*)*|\s*\.\.\.\s*)?\)");
2323
}
2424

2525
public override bool CheckMatch(string line)

0 commit comments

Comments
 (0)