Skip to content
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

Add support for the C++ #3

Open
VzdornovNA88 opened this issue Aug 11, 2020 · 2 comments
Open

Add support for the C++ #3

VzdornovNA88 opened this issue Aug 11, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@VzdornovNA88
Copy link

Hello, Can you add support for C++? Unfortunately, there are no extensions for refactoring for C++ but I think that many people need it.

@ypresto
Copy link
Owner

ypresto commented Dec 5, 2020

Thanks for feedback!
We need C++ AST to support it.
I'm not familiar with C++, so do you know standard way to retrieve it (command, library, etc.)?

@ypresto ypresto added the help wanted Extra attention is needed label Dec 5, 2020
@VzdornovNA88
Copy link
Author

Hello,Sorry for my English. I thought that your project is dead and I am glad I made a mistake, so that is really complicated question even though I have been working in C++ for along time cause I don't know anything about an official ready-made solution for this problem but I know a few workarounds, so let's bagine :
If I were solving this problem I would start with :
https://github.com/llvm/llvm-project.git (https://llvm.org) - it is really important point cause this is universal program infrastructure of modular and reusable compiler and toolchain technologies , here we are interested in the module "CLANG" and "LIBCLANG" (https://github.com/llvm/llvm-project/tree/master/clang , https://clang.llvm.org/docs/Tooling.html) libclang provides API to work with AST of C++. So You can use libclang to create your plugin. Also project "CLANG" has bindings for other languages but unfortunately it is a python and nothing else no bindings. Also there is project emscripten (https://github.com/emscripten-core/emscripten) capable of running an interpreter of python. And also I think that there are a lot of converters python code to JS.
So workarounds :

  1. Develop clang(libclang) binding for JS as well as for python here and then use it to create your plugin extension for C++.
  2. Use python binding in JS running it in interpreter emscripten and getting the results of execution in your JS code of plugin
  3. Convert code of python binding to JS and use the conversion result in your code of plugin.

At the moment these are superficial ways that came to my mind. I will think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants