Skip to content

Commit 5f7ee03

Browse files
authored
expand the function element of classRange
Needed to show the difference between the `<function><functionName><nameExpr expr="....">` and `<classRange><function><functionName><funcNameExpr expr="...">` (noted by me [here](https://community.notepad-plus-plus.org/post/72504) when comparing https://community.notepad-plus-plus.org/post/72484 to https://community.notepad-plus-plus.org/post/72488)
1 parent 85c1ae6 commit 5f7ee03

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

content/docs/function-list.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ The `<classRange>` node accepts the following attributes and contained elements:
5959
- `openSymbole` & `closeSymbole` (_attribute_): They are optional. If defined, then the parser will determine the zone of this class: it find first `openSymbole` from the first character of the string found by "mainExpr" attribute; then it determines the end of class by `closeSymbole` found. The algorithm deals with the several levels of nesting. For example: `\{\{\{\}\{\}\}\{\}\}`
6060
- `className` (_element_): Contains one or more `nameExpr` nodes for determining class name (from the result of `mainExpr` searching).
6161
- `function` (_element_): Finds functions inside the class zone by using the expressions found in the `mainExpr` attribute and the `functionName` nodes.
62+
- _Note_: This `function` node looks similar to the `function` node in the **Function parser** above, but it _is different_, and has slightly different contents.
63+
- `mainExpr` (_attribute_): The regex to get the whole string which contains all the informations you need.
64+
- `functionName` (_element_): The wrapper for digging into and finding the text for the function name
65+
- `functionNameExpr` (_element_): The element for the function name of a function inside a class. Please note that it uses the `functionNameExpr` element instead of the `nameExpr` element in the **Function parser**. Yes, it's confusing.
66+
- `expr` (_attribute_): this is where you put the regular expression defines what should match to be used in displaying the function name in the Function List panel.
6267

6368
### Mixed parser
6469
A mixed parser contains a Class parser (`classRange` node) and a Function parser (`function` node). The Class parser will be applied first to find class zones, then the Function parser will be applied on non-class zones.

0 commit comments

Comments
 (0)