You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/DataStructures/Lua/Function.cs
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,8 @@ public class Function : DataStructure
18
18
19
19
publicoverrideRegexGetRegex()
20
20
{
21
-
returnnewRegex(@"(^\s*(local\s+)?\s*|@)function\s*\w+((\.|\:)\w+)*\s*\((\w+\s*(,\s*\w+\s*)*)?\)");// RegEx matches "@function opt.name(param, opt)" or "local function opt:name()"
21
+
// RegEx matches "@function opt.name(param, opt)" or "local function opt:name()"
// HINT: That means that if using e.g. `---` instead of `--` while
124
+
// documenting e.g. a param addition in a new line, this line will be
125
+
// handled as a new description entry instead of a continued
126
+
// param addition / param description.
127
+
lineParam=newDescParam();
128
+
129
+
paramsList.Add(lineParam);
97
130
}
98
-
else
131
+
elseif(paramsList.Count>0)// if there are params in the list
99
132
{
100
-
if(paramMatcher.IsLineCommentStart(line))// if matching e.g. "---"
101
-
{
102
-
paramsList.Clear();// clear the paramsList if a new docu block starts
103
-
104
-
lineParam=newDescParam();// start with a new description by default. HINT: That means that if using e.g. `---` instead of `--` while documenting e.g. a param addition in a new line, this line will be handled as a new description entry instead of a continued param addition / param description.
105
-
106
-
paramsList.Add(lineParam);
107
-
}
108
-
elseif(paramsList.Count>0)// if there are params in the list
109
-
{
110
-
lineParam=paramsList.ElementAt(paramsList.Count-1);// use last param as new line param to support multiline commenting style e.g.
0 commit comments