Implement REGEXMATCH function (#15)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
Pijus Kamandulis
2026-05-30 21:31:45 +03:00
committed by GitHub
parent c3726a6633
commit 05e8cd2842
8 changed files with 1160 additions and 922 deletions
+3 -1
View File
@@ -681,6 +681,8 @@ ThreeArgumentStringFunctionExpression <- function:ThreeArgumentStringFunction ws
functionType = parsers.FunctionCallEndsWith
case "STARTSWITH":
functionType = parsers.FunctionCallStartsWith
case "REGEXMATCH":
functionType = parsers.FunctionCallRegexMatch
case "INDEX_OF":
functionType = parsers.FunctionCallIndexOf
}
@@ -688,7 +690,7 @@ ThreeArgumentStringFunctionExpression <- function:ThreeArgumentStringFunction ws
return createFunctionCall(functionType, []interface{}{ex1, ex2, ignoreCase})
}
ThreeArgumentStringFunction <- ("CONTAINS"i / "ENDSWITH"i / "STARTSWITH"i / "INDEX_OF"i) {
ThreeArgumentStringFunction <- ("CONTAINS"i / "ENDSWITH"i / "STARTSWITH"i / "REGEXMATCH"i / "INDEX_OF"i) {
return string(c.text), nil
}