Skip to content

Commit

Permalink
Fix GDScript3 analyse regexes (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
gandarez authored Sep 16, 2023
1 parent c4527e8 commit 2b39461
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lexers/embedded/gdscript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<mime_type>text/x-gdscript</mime_type>
<mime_type>application/x-gdscript</mime_type>
<priority>0.1</priority>
<analyse first="true">
<regex pattern="^@" score="0.4"/>
<analyse>
<regex pattern="^export" score="0.1"/>
</analyse>
</config>
<rules>
Expand Down
6 changes: 4 additions & 2 deletions lexers/embedded/gdscript3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<filename>*.gd</filename>
<mime_type>text/x-gdscript</mime_type>
<mime_type>application/x-gdscript</mime_type>
<analyse first="true">
<regex pattern="^export" score="0.1"/>
<analyse>
<regex pattern="func (_ready|_init|_input|_process|_unhandled_input)" score="0.8"/>
<regex pattern="(extends |class_name |onready |preload|load|setget|func [^_])" score="0.4"/>
<regex pattern="(var|const|enum|export|signal|tool)" score="0.2"/>
</analyse>
</config>
<rules>
Expand Down

0 comments on commit 2b39461

Please sign in to comment.