-
Notifications
You must be signed in to change notification settings - Fork 414
Add tree-sitter-gdscript and tree-sitter-godot for Godot development #904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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
|
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). |
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.