Skip to content

Commit 2b39461

Browse files
authoredSep 16, 2023
Fix GDScript3 analyse regexes (#848)
1 parent c4527e8 commit 2b39461

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
 

‎lexers/embedded/gdscript.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<mime_type>text/x-gdscript</mime_type>
88
<mime_type>application/x-gdscript</mime_type>
99
<priority>0.1</priority>
10-
<analyse first="true">
11-
<regex pattern="^@" score="0.4"/>
10+
<analyse>
11+
<regex pattern="^export" score="0.1"/>
1212
</analyse>
1313
</config>
1414
<rules>

‎lexers/embedded/gdscript3.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
<filename>*.gd</filename>
77
<mime_type>text/x-gdscript</mime_type>
88
<mime_type>application/x-gdscript</mime_type>
9-
<analyse first="true">
10-
<regex pattern="^export" score="0.1"/>
9+
<analyse>
10+
<regex pattern="func (_ready|_init|_input|_process|_unhandled_input)" score="0.8"/>
11+
<regex pattern="(extends |class_name |onready |preload|load|setget|func [^_])" score="0.4"/>
12+
<regex pattern="(var|const|enum|export|signal|tool)" score="0.2"/>
1113
</analyse>
1214
</config>
1315
<rules>

0 commit comments

Comments
 (0)
Please sign in to comment.