Add tree-sitter-gdscript and tree-sitter-godot for Godot development#904
Open
sockeye-d wants to merge 414 commits intoWilfred:masterfrom
Open
Add tree-sitter-gdscript and tree-sitter-godot for Godot development#904sockeye-d wants to merge 414 commits intoWilfred:masterfrom
sockeye-d wants to merge 414 commits intoWilfred:masterfrom
Conversation
… name
modified rules:
- {augmented,_variable{_inferred_type,_typed,}}_assignment
- parenthesized_expression
- assignment
- pair
- array
- {typed_default,default}_parameter
- function_definition
- argument_list
Anonymous functions are parsing correctly, but the current body rule does
not allow the following:
call(func hello(): pass) # ERROR MISSING newline
The body rule should allow being a single statement with no following
newline.
Still fails to parse the following:
var p = func(): if true: pass else: pass
…with opt name" This reverts commit 86e8d44.
…or pattern matching
…rn/tar-fs-2.1.4 Bump tar-fs from 2.1.2 to 2.1.4
…ype to error supersedes Wilfred#63 Co-Authored-By: Nate Moore <[email protected]>
Add support for not followed by await expression
Co-authored-by: Preston Knopp <[email protected]>
Fix trailing comments after final statement in a function
Fix de-dented comment breaking function parsing
Contributor
|
I'm not a maintainer, but be aware that we're in the process of unvendoring parsers so that they are fetched from crates.io instead (#891), so I would be reluctant to introduce new parsers that are vendored (I think the godot ones are available on crates.io). I updated the recommended process here: #902 That being said, I think given that there are quite a few open PRs adding support for new languages, it's probably worth checking if new languages are welcome at the moment or not (before you put more work into this). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not sure if I did this right, but I added two new tree-sitter definitions for GDScript files (
*.gd) and Godot text resources (*.tres,*.tscn,project.godot).Neither of them have highlighting — I'm not sure if there's a scm file for GDScript already, and I don't know how to make one.