prestonknopp / tree-sitter-gdscript Goto Github PK
View Code? Open in Web Editor NEWTree sitter grammar for Godot's GDScript
Home Page: https://www.npmjs.com/package/tree-sitter-gdscript
License: MIT License
Tree sitter grammar for Godot's GDScript
Home Page: https://www.npmjs.com/package/tree-sitter-gdscript
License: MIT License
Exported variables fail to parse if they have the onready keyword.
I am not able to run tree-sitter as it shows hoon and gdscript can't be installed. I have a windows PC. Moreover the makefile in the hoon and gdscript doesn't works
Moreover whenever I try to open any file it shows the server is not installed, but the server is already there
I have just installed the stuff else nothing extra I have done
It shouldn't give errors
:checkhealth nvim-treesitter
Alot of errors like this
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
- OK `tree-sitter` found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v20.10.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `gcc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: gcc (MinGW.org GCC-6.3.0-1) 6.3.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "x86_64",
release = "10.0.22631",
sysname = "Windows_NT",
version = "Windows 11 Pro"
} ~
Parser/Features H L F I J
- ada x x x . .
- agda x . x . .
- angular x . . . .
- apex x x x . .
- arduino x x x x x
- astro x x x x x
- authzed x . . . x
- awk x . . . x
- bash x x x . x
- bass x x x x x
- beancount x . x . .
- bibtex x . x x .
- bicep x x x x x
- bitbake x x x x x
- blueprint x . . . .
- c x x x x x
- c_sharp x x x . x
- cairo x x x x x
- capnp x x x x x
- chatito x x x x x
- clojure x x x . x
- cmake x . x x .
- comment x . . . .
- commonlisp x x x . .
- cooklang x . . . .
- corn x x x x .
- cpon x x x x x
- cpp x x x x x
- css x . x x x
- csv x . . . .
- cuda x x x x x
- cue x x x x x
- d x . x x x
- dart x x x x x
- devicetree x x x x x
- dhall x . x . x
- diff x . . . .
- dockerfile x . . . x
- dot x . . . x
- doxygen x . . x x
- dtd x x x . x
- ebnf x . . . .
- eds x . x . .
- eex x . . . x
- elixir x x x x x
- elm x . . . x
- elsa x x x x x
- elvish x . . . x
- embedded_template x . . . x
- erlang x . x . .
- facility x . x x x
- fennel x x x . x
- firrtl x x x x x
- fish x x x x x
- foam x x x x x
- forth x x x x x
- fortran x . x x .
- fsh x . . . .
- func x . . . .
- fusion x x x x .
- git_config x . . . .
- git_rebase x . . . x
- gitattributes x x . . x
- gitcommit x . . . x
- gitignore x . . . .
- gleam x x x x x
- glimmer x x x x .
- glsl x x x x x
- gn x x x x x
- go x x x x x
- godot_resource x x x . .
- gomod x . . . x
- gosum x . . . .
- gowork x . . . x
- gpg x . . . x
- graphql x . . x x
- groovy x . . . x
- gstlaunch x . . . .
- hack x . . . .
- hare x x x x x
- haskell x . x . x
- haskell_persistent x . x . .
- hcl x . x x x
- heex x x x x x
- hjson x x x x x
- hlsl x x x x x
- hocon x . x . x
- html x x x x x
- htmldjango x . x x x
- http x . . . x
- hurl x . x x x
- ini x . x . .
- ispc x x x x x
- janet_simple x x x . x
- java x x x x x
- javascript x x x x x
- jq x x . . x
- jsdoc x . . . .
- json x x x x .
- json5 x . . . x
- jsonc x x x x x
- jsonnet x x x . .
- julia x x x x x
- kconfig x x x x x
- kdl x x x x x
- kotlin x x x . x
- kusto x . . . x
- lalrpop x x . . x
- latex x . x . x
- ledger x . x x x
- leo x . . . x
- linkerscript x x x x x
- liquidsoap x x x x .
- llvm x . . . .
- lua x x x x x
- luadoc x . . . .
- luap x . . . .
- luau x x x x x
- m68k x x x . x
- make x . x . x
- markdown x . x x x
- markdown_inline x . . . x
- matlab x x x x x
- menhir x . . . x
- mermaid x . . . .
- meson x . x . x
- mlir x x . . .
- nasm x . . . x
- nickel x . . x .
- nim x x x . x
- nim_format_string x . . . x
- ninja x . x x .
- nix x x x . x
- norg . . . . .
- nqc x x x x x
- objc x x x x x
- objdump x . . . x
- ocaml x x x x x
- ocaml_interface x x x x x
- ocamllex x . . . x
- odin x x x x x
- org . . . . .
- pascal x x x x x
- passwd x . . . .
- pem x . x . x
- perl x . x . x
- php x x x x x
- phpdoc x . . . .
- pioasm x . . . x
- po x . x . x
- pod x . . . .
- poe_filter x . x x x
- pony x x x x x
- prisma x . x . .
- promql x . . . x
- properties x x . . x
- proto x . x . .
- prql x . . . x
- psv x . . . .
- pug x . . . x
- puppet x x x x x
- purescript x x . . x
- pymanifest x . . . x
- python x x x x x
- ql x x x x x
- qmldir x . . . x
- qmljs x . x . .
- query x x x x x
- r x x . x x
- racket x . x . x
- rasi x x x x .
- rbs x . x x x
- re2c x x x x x
- regex x . . . .
- rego x . . . x
- requirements x . . . x
- rnoweb x . x . x
- robot x . x x .
- ron x x x x x
- rst x x . . x
- ruby x x x x x
- rust x x x x x
- scala x x x . x
- scfg x . . . x
- scheme x . x . x
- scss x . x x .
- slang x x x x x
- slint x . . x .
- smali x x x x x
- smithy x . . . .
- snakemake x x x . x
- solidity x . x . .
- soql x . . . .
- sosl x . . . .
- sparql x x x x x
- sql x . . x x
- squirrel x x x x x
- ssh_config x x x x x
- starlark x x x x x
- strace x . . . x
- supercollider x x x x x
- surface x . x x x
- svelte x . x x x
- swift x x . x .
- sxhkdrc x . x . x
- systemtap x x x . x
- t32 x x x x x
- tablegen x x x x x
- teal x x x x x
- templ x . . . x
- terraform x . x x x
- textproto x . x x .
- thrift x x x x x
- tiger x x x x x
- tlaplus x x x . x
- todotxt x . . . .
- toml x x x x x
- tsv x . . . .
- tsx x x x x x
- turtle x x x x x
- twig x . . . x
- typescript x x x x x
- typoscript x . x x x
- udev x x . . x
- ungrammar x x x x x
- unison x . . . x
- usd x x x x .
- uxntal x x x x x
- v x x x x x
- vala x . x . .
- verilog x x x . x
- vhs x . . . .
- vim x x x . x
- vimdoc x . . . x
- vue x . x x x
- wgsl x . x x .
- wgsl_bevy x . x x .
- wing x x x . .
- xcompose x x . . x
- xml x x x x x
- yaml x x x x x
- yang x . x x x
- yuck x x x x x
- zig x . x x x
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~
The following errors have been detected: ~
- ERROR ada(highlights): Failed to load parser for language 'ada': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\ada.so is not a valid Win32 application.
ada(highlights) is concatenated from the following files:
| [ERROR]:"C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\ada\highlights.scm", failed to load: Failed to load parser for language 'ada': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\ada.so is not a valid Win32 application.
- ERROR ada(locals): Failed to load parser for language 'ada': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\ada.so is not a valid Win32 application.
ada(locals) is concatenated from the following files:
| [ERROR]:"C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\ada\locals.scm", failed to load: Failed to load parser for language 'ada': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\ada.so is not a valid Win32 application.
- ERROR ada(folds): Failed to load parser for language 'ada': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\ada.so is not a valid Win32 application.
ada(folds) is concatenated from the following files:
| [ERROR]:"C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\ada\folds.scm", failed to load: Failed to load parser for language 'ada': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\ada.so is not a valid Win32 application.
- ERROR agda(highlights): Failed to load parser for language 'agda': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\agda.so is not a valid Win32 application.
agda(highlights) is concatenated from the following files:
| [ERROR]:"C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\agda\highlights.scm", failed to load: Failed to load parser for language 'agda': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\agda.so is not a valid Win32 application.
- ERROR agda(folds): Failed to load parser for language 'agda': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\agda.so is not a valid Win32 application.
agda(folds) is concatenated from the following files:
| [ERROR]:"C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\queries\agda\folds.scm", failed to load: Failed to load parser for language 'agda': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\agda.so is not a valid Win32 application.
- ERROR angular(highlights): Failed to load parser for language 'angular': uv_dlopen: C:\Users\talk2\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter\parser\angular.so is not a valid Win32 application.
nvim --version
NVIM v0.9.4
Build type: RelWithDebInfo
LuaJIT 2.1.1696883897
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe /MD /Zi /O2 /Ob1 -W3 -wd4311 -wd4146 -DUNIT_TESTING -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602 -DMSWIN -DINCLUDE_GENERATED_DECLARATIONS -ID:/a/neovim/neovim/.deps/usr/include/luajit-2.1 -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include -ID:/a/neovim/neovim/build/cmake.config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include
system vimrc file: "$VIM\sysinit.vim"
fall-back for $VIM: "C:/Program Files (x86)/nvim/share/nvim"
Run :checkhealth for more info
Moreover When I reported this to Treesitter(nvim-treesitter/nvim-treesitter#5771)
they were of this view:
class IClass:
class IIClass:
var prop
var prop
const iclass = IClass
var a1: Array[IClass.IIClass]
var a2: Array[iclass.IIClass]
var a3: Array[int]
Support can be added by rewriting the type
node to be a non-terminal composed of (identifier)
s, (subscript)
s, and (attribute)
s. This new type
node will replace (dotted_type)
.
Array[IClass.IIClass]
could be represented like
(type
(subscript
(identifier)
(attribute
(identifier)
(identifier))))
Where
(subscript)
encapsulates generic specifier.(attribute)
s of (identifier)
s represent dotted types.Additionally, highlight queries can use convention to differentiate between members and types.
Part of Godot 4 support. Anonymous functiosn cause ERROR.
I tried to get this working, but I keep hitting conflicts and I'm not very experienced with tree-sitter :/
============================================
Anonymous functions
============================================
connect("", func():
print()
)
---
(source
(expression_statement
(call
(identifier)
(argument_list
(string)
(ERROR
(call
(identifier)
(argument_list)))
(call
(identifier)
(argument_list))))))
Godot 4 comes with gdscript 2. I've experience some ERROR nodes with the current version.
Specifically:
@export
and co., @onready
, @tool
, @rpc
, etc) are new in Godot 4 and are not recognized%Node
) were introduced in Godot 3.5 and are not recognizedIt's possible there's more, these are just the ones I've found.
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.