We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf52b35 + 6d26c9c commit 9da7fa4Copy full SHA for 9da7fa4
src/lib/functions.ts
@@ -74,7 +74,7 @@ export const parseSubroutine = (line: TextLine) => {
74
return _parse(line, MethodType.Subroutine);
75
};
76
export const _parse = (line: TextLine, type: MethodType) => {
77
- const functionRegEx = /([a-zA-Z]+(\([\w.=]+\))*)*\s*\bfunction\b\s*([a-zA-Z_][a-z0-9_]*)\s*\((\s*[a-z_][a-z0-9_,\s]*)*\s*(\)|\&)\s*(result\([a-z_][\w]*(\)|\&))*/i;
+ const functionRegEx = /(?<=([a-zA-Z]+(\([\w.=]+\))*)*)\s*\bfunction\b\s*([a-zA-Z_][a-z0-9_]*)\s*\((\s*[a-z_][a-z0-9_,\s]*)*\s*(?:\)|\&)\s*(result\([a-z_][\w]*(?:\)|\&))*/i;
78
const subroutineRegEx = /^\s*(?!\bend\b)\w*\s*\bsubroutine\b\s*([a-z][a-z0-9_]*)\s*(?:\((\s*[a-z][a-z0-9_,\s]*)*\s*(\)|\&))*/i;
79
const regEx =
80
type === MethodType.Subroutine ? subroutineRegEx : functionRegEx;
0 commit comments