This is an experimental project. The general idea is to reuse the AGS Script Tree Sitter parser generated by Edmundito, add C# bindings using SWIG and build it for multiplatform (Windows/MacOS/Linux) using CMake.
This project is largely inspired by the python java tree sitter parser here. The cmake parts are made with code from the tree-sitter-cmake project here, but code has been heavily updated to work with latest tree-sitter.
You need to have swig installed (by apt, choco or brew).
Generate the swig files by running the bash script in this folder.
With the swig files generated, build the libraries twice once static and later shared. Place the generated .so
/.dll
/.dylib
files in their respective directories under generated/
The readings below provide useful information.
- https://log.paulbetts.org/the-bait-and-switch-pcl-trick/
- https://github.com/xamcat/mobcat-samples/tree/master/cpp_with_xamarin
- https://github.blog/2016-02-01-working-with-submodules/
- http://www.swig.org/Doc3.0/SWIG.html#output
- http://www.swig.org/Doc3.0/CSharp.html
- https://tree-sitter.github.io/tree-sitter/using-parsers