Godot resource grammar for tree-sitter.
Parses tscn and tres files.
Godot resource grammar for tree-sitter. Parses tscn, tres, and project.godot files.
Home Page: https://www.npmjs.com/package/tree-sitter-godot-resource
License: MIT License
Godot resource grammar for tree-sitter.
Parses tscn and tres files.
I get this error when I try to add godot_resource
to treesitter:
tree-sitter CLI not found: `tree-sitter` is not executable!
I have to remove godot_resource
to not get this error at startup of Neovim.
The square brackets used for the array type incorrectly trigger a new section in the language tree.
Here's an example.
I defined a custom resource type containing an array:
class_name TestResource
extends Resource
@export var test_array: Array[int]
This is an example of what the resource file looks like:
[gd_resource type="Resource" script_class="TestResource" load_steps=2 format=3 uid="uid://8w1p11bcyooo"]
[ext_resource type="Script" path="res://test_resource.gd" id="1_rtd2s"]
[resource]
script = ExtResource("1_rtd2s")
test_array = Array[int]([42, 76])
This is what the tree looks like:
(section) ; [1:1 - 104]
(identifier) ; [1:2 - 12]
(attribute) ; [1:14 - 28]
(identifier) ; [1:14 - 17]
(string) ; [1:19 - 28]
(attribute) ; [1:30 - 56]
(identifier) ; [1:30 - 41]
(string) ; [1:43 - 56]
(attribute) ; [1:58 - 69]
(identifier) ; [1:58 - 67]
(integer) ; [1:69 - 69]
(attribute) ; [1:71 - 78]
(identifier) ; [1:71 - 76]
(integer) ; [1:78 - 78]
(attribute) ; [1:80 - 103]
(identifier) ; [1:80 - 82]
(string) ; [1:84 - 103]
(section) ; [3:1 - 71]
(identifier) ; [3:2 - 13]
(attribute) ; [3:15 - 27]
(identifier) ; [3:15 - 18]
(string) ; [3:20 - 27]
(attribute) ; [3:29 - 57]
(identifier) ; [3:29 - 32]
(string) ; [3:34 - 57]
(attribute) ; [3:59 - 70]
(identifier) ; [3:59 - 60]
(string) ; [3:62 - 70]
(section) ; [5:1 - 7:18]
(identifier) ; [5:2 - 9]
(property) ; [6:1 - 31]
(path) ; [6:1 - 6]
(constructor) ; [6:10 - 31]
(identifier) ; [6:10 - 20]
(arguments) ; [6:21 - 31]
(string) ; [6:22 - 30]
(property) ; [7:1 - 18]
(path) ; [7:1 - 10]
(identifier) ; [7:14 - 18]
(section) ; [7:19 - 23]
(identifier) ; [7:20 - 22]
(ERROR) ; [7:24 - 33]
(integer) ; [7:26 - 27]
(integer) ; [7:30 - 31]
[int]
is wrongly parsed as (section) ; [7:19 - 23]
. Also, it results in an (ERROR) node for what follows after.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.