PrestonKnopp / language-gdscript

gdscript language grammar package for atom.io
https://atom.io/packages/lang-gdscript
MIT License
32 stars 9 forks source link

Rakugo support #15

Closed Jeremi360 closed 4 years ago

Jeremi360 commented 5 years ago

@PrestonKnopp

As we talk in other issue : https://github.com/PrestonKnopp/language-gdscript/issues/12#issuecomment-483769861

I make this issue about Rakugo support/plugin for language-gdscript. Rakugo is framework/addon for godot for making story driven games.

So Rakugo needs:

In feature I want to make RakugoScript similar language to Ren'Py Langue with possibility to use GDScript blocks in side it.

@PrestonKnopp anwsered to it:

This could be done by writing a tree-sitter-rakugo-script parser. Tree-Sitter is the parser engine i'm using for GDScript. The reason I bring this up is that tree sitter can import other tree-sitter parsers. Additionally the syntax tree that tree-sitter produces can be used to transpile RakugoScript to GDScript, C++, or whatever language one has the time to write. I'm also willing to help write the parser for rakugo if you would like to go that path.

I like this idea it will make RakugoSript relay easy to extend and use I think. Also I know that you can run terminal commands from Godot it self, so developer only will need to have installed node.js to transcompile it.

PrestonKnopp commented 5 years ago

Awesome! Can't wait to have this working

Jeremi360 commented 5 years ago

@PrestonKnopp The first release of Rakugo is here 😄 https://github.com/jebedaia360/Rakugo/releases/tag/v2.0.0_core The are now (WIP) readthedocs for Rakugo 😄 : https://rakugo.readthedocs.io/en/latest JS and it's derivatives are not my thing. So instead of using as you propose Tree-Sitter to make transpiler. I use XDL to implement RakugoScript in godot and autor of XDL him self helps me with that. So you can join us on my discord to start implementing support for Rakugo and RakugoScript in your addon 😄

PrestonKnopp commented 5 years ago

Congrats! Awesome, stuff!

I might have some free time this weekend to work some more on this plugin.

Jeremi360 commented 5 years ago

@PrestonKnopp How is going with your suport for Rakugo in GDScript?

So after some talk whit autor of XDL, I discover that he have strong vision that his tool should be only use for dialogs code only, but I want to make RakugoScript almost as advanced as Ren'Py/GDScript so I will try to use tree-sitter - I discover that it has python bindings so I can use it.

If you need some examples of use you can download it here: https://github.com/jebedaia360/Rakugo/releases/tag/2.0.0_examples Also now I work on better example - small vn game that shows all Rakugo features - question branch. If this is any help here is video how to start with Rakugo first dialog: https://youtu.be/psQUNyGU4jA

PrestonKnopp commented 5 years ago

Awesome, thanks for the resources. I haven’t had much time to sit down and really work on this so support is not there, yet.

PrestonKnopp commented 5 years ago

Nice, tree-sitter is pretty straightforward. The caveat is that you can’t implement parser time errors and messages. You’ll have to parse the AST and look for error nodes and rebuild the parser error from the context.

PrestonKnopp commented 4 years ago

I'm sad to finally say that I will not be adding Rakugo support. I wish you luck with your fantastic framework and I'll be trolling through your issues to see if I can contribute directly.

Jeremi360 commented 4 years ago

@PrestonKnopp ok, I'm little sad, but can I know why not?

PrestonKnopp commented 4 years ago

Oh yeah, of course. I won't be adding support for Rakugo GDScript because I think Godot's language server does the job better and more. The thing it doesn't do is complete string literals for dictionary keys and the Rakugo.define() construct.

For RakugoScript, I think that should be another package. I'd be happy to write the atom grammar for RakugoScript.

Jeremi360 commented 4 years ago

I will start on working on RakugoScript soon :D