-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfreebasic.xml
More file actions
52 lines (48 loc) · 2.44 KB
/
freebasic.xml
File metadata and controls
52 lines (48 loc) · 2.44 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
<?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>
<!-- ============================================================================ [ FreeBASIC ] -->
<!-- FreeBASIC - Free/Open Source (GPL), BASIC compiler for Microsoft Windows, DOS and Linux -->
<parser
id ="freebasic.xml"
displayName="FreeBASIC - Free/Open Source (GPL), BASIC compiler for Microsoft Windows, DOS and Linux"
commentExpr="(?s:\x2F\x27.*?\x27\x2F)|(?mi-s:(\x27|REM\s+).*?$)"
>
<function
mainExpr="(^|:)[\t\x20]*((sub|function|constructor|destructor|property)[\t\x20]+[a-zA-Z0-9_\.]+|operator[\t\x20]+[a-zA-Z]*\.?([=+\-\*/\!@#$^&\\]+|\(\)|\[\]|<>))[\t\x20]*\(.*?\)([\t\x20]+\w+)*[\t\x20]*$"
>
<functionName>
<nameExpr expr="((([\t\x20]+\.)?\w+)|([a-zA-Z]*\.?([=+\-\*/\!@#$^&\\]+|\(\)|\[\]|<>)))[\t\x20]*\(.*?\)([\t\x20]+\w+)*[\t\x20]*$" />
<nameExpr expr="((([\t\x20]+\.)?\w+)|([a-zA-Z]*\.?([=+\-\*/\!@#$^&\\]+|\(\)|\[\]|<>)))" /> <!-- comment this line if you want to keep parameter list and return type -->
</functionName>
<className>
<nameExpr expr="\w+\.[a-zA-Z_]+" />
<nameExpr expr="^\w+" />
</className>
</function>
<classRange
mainExpr ="(^|:)[\t\x20]*type[\t\x20]+\w+([\t\x20]+(extends|field)|[\t\x20]*\n)(.+?)\s+end[\t\x20]+type[\t\x20]*$"
>
<className>
<nameExpr expr="(^|:)[\t\x20]*type[\t\x20]+\w+" />
<nameExpr expr="\w+$" />
</className>
<function
mainExpr="(^|:)[\t\x20]*declare[\t\x20]+((sub|function|constructor|destructor|property)[\t\x20]+[a-zA-Z0-9_\.]+|operator[\t\x20]+[a-zA-Z]*\.?([=+\-\*/\!@#$^&\\]+|\(\)|\[\]|<>))[\t\x20]*\(.*?\)([\t\x20]+\w+)*[\t\x20]*$"
>
<functionName>
<funcNameExpr expr="((([\t\x20]+\.)?\w+)|([a-zA-Z]*\.?([=+\-\*/\!@#$^&\\]+|\(\)|\[\]|<>)))[\t\x20]*\(.*?\)([\t\x20]+\w+)*[\t\x20]*$" />
<funcNameExpr expr="((([\t\x20]+\.)?\w+)|([a-zA-Z]*\.?([=+\-\*/\!@#$^&\\]+|\(\)|\[\]|<>)))" /> <!-- comment this line if you want to keep parameter list and return type -->
</functionName>
</function>
</classRange>
</parser>
</functionList>
</NotepadPlus>