forked from CodeExplainedRepo/Snake-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnsis.xml
More file actions
146 lines (145 loc) · 6.82 KB
/
nsis.xml
File metadata and controls
146 lines (145 loc) · 6.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="UTF-8" ?>
<!-- ==========================================================================\
|
| To learn how to make your own language parser, please check the following
| link:
| https://npp-user-manual.org/docs/function-list/
|
\=========================================================================== -->
<NotepadPlus>
<functionList>
<!-- ======================================================== [ NSIS ] -->
<!-- NSIS - Nullsoft Scriptable Install System -->
<parser
displayName="NSIS"
id ="nsis_syntax"
>
<classRange
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
\b(?-i:SectionGroup)\b # open indicator
(?s:.*?)
\b(?-i:SectionGroupEnd)\b # close indicator
"
>
<className>
<nameExpr expr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
(?m-s)
SectionGroup\h+(?-i:/e\h+)? # start indicator and its optional switch
\K # keep the text matched so far, out of the overall match
.+$ # whatever, till end-of-line
"
/>
<nameExpr expr="[^\r\n\x22]*" />
</className>
<function
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
(?m)
^(?'INDENT'\h*) # optional leading whitespace at start-of-line
(?:
(?-i:!macro)
\h+ # required whitespace separator
\K # keep the text matched so far, out of the overall match
[^\r\n]*$ # whatever, until end-of-line
|
(?'TAG'(?-i:Function|PageEx|Section))
\h+ # required whitespace separator
(?-i:/o\h+)? # optional switch
\K # keep the text matched so far, out of the overall match
(?s:
.*? # whatever,
(?= # up till...
^\k'INDENT' # ...equal indent at start-of-line for...
\k'TAG'End\b # ...matching close indicator
)
)
|
\x24\x7B # start-of-open-element indicator
(?'ID'[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*)
\x7D # end-of-open-element indicator
\h+ # required whitespace separator
(?-i:/o\h+)? # optional switch
\K # keep the text matched so far, out of the overall match
(?s:
.*? # whatever,
(?= # up till...
^\k'INDENT' # ...equal indent at start-of-line for...
\x24\x7B\k'ID'End\x7D # ...matching close indicator
)
)
)
"
>
<functionName>
<funcNameExpr expr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
(?m)
[^\r\n]+? # whatever,
(?= # up till...
\h* # ...optional whitespace and...
(?:
\x2F\x2A # ...start of multi line comment or...
| [\x23;] # ...start of single line comment or...
| $ # ...end-of-line
)
)
"
/>
</functionName>
</function>
</classRange>
<function
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
(?m)
^(?'INDENT'\h*) # optional leading whitespace at start-of-line
(?:
(?-i:!macro)
\h+ # required whitespace separator
\K # keep the text matched so far, out of the overall match
[^\r\n]*$ # whatever, until end-of-line
|
(?'TAG'(?-i:Function|PageEx|Section))
\h+ # required whitespace separator
(?-i:/o\h+)? # optional switch
\K # keep the text matched so far, out of the overall match
(?s:
.*? # whatever,
(?= # up till...
^\k'INDENT' # ...equal indent at start-of-line for...
\k'TAG'End\b # ...matching close indicator
)
)
|
\x24\x7B # start-of-open-element indicator
(?'ID'[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*)
\x7D # end-of-open-element indicator
\h+ # required whitespace separator
(?-i:/o\h+)? # optional switch
\K # keep the text matched so far, out of the overall match
(?s:
.*? # whatever,
(?= # up till...
^\k'INDENT' # ...equal indent at start-of-line for...
\x24\x7B\k'ID'End\x7D # ...matching close indicator
)
)
)
"
>
<functionName>
<nameExpr expr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
(?m)
[^\r\n]+? # whatever,
(?= # up till...
\h* # ...optional whitespace and...
(?:
\x2F\x2A # ...start of multi line comment or...
| [\x23;] # ...start of single line comment or...
| $ # ...end-of-line
)
)
"
/>
</functionName>
</function>
</parser>
</functionList>
</NotepadPlus>