Complete RegExp.exec refactor for performance optimization

Co-authored-by: asukaminato0721 <30024051+asukaminato0721@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-09-25 17:31:33 +00:00
parent 9533b88a9f
commit b7bfa0ca6e
12 changed files with 30 additions and 13 deletions

View File

@ -10,7 +10,7 @@ export const extractFunctionParams = (code: string, language: CodeLanguage) => {
[CodeLanguage.python3]: /def\s+main\s*\((.*?)\)/,
[CodeLanguage.javascript]: /function\s+main\s*\((.*?)\)/,
}
const match = code.match(patterns[language])
const match = patterns[language].exec(code)
const params: string[] = []
if (match?.[1]) {