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

Support C++ #84

Open
sboulema opened this issue Mar 8, 2019 · 3 comments
Open

Support C++ #84

sboulema opened this issue Mar 8, 2019 · 3 comments
Assignees
Labels
enhancement marketplace Sourced from the VS Marketplace

Comments

@sboulema
Copy link
Owner

sboulema commented Mar 8, 2019

ClangSharp
Using libclang to Parse C++ (aka libclang 101)

public void Parse()
{
    var index = clang.createIndex(0, 0);
    var unit = clang.parseTranslationUnit(index,"path",null, 0, out var unsavedFiles, 0, 0);
    clang.disposeTranslationUnit(unit);
    clang.disposeIndex(index);
}
@sboulema sboulema added enhancement marketplace Sourced from the VS Marketplace labels Mar 8, 2019
@sboulema sboulema self-assigned this Mar 8, 2019
@Nerpson
Copy link

Nerpson commented Jul 21, 2022

Any news on the C++ support? Your extension would greatly enhance my C++ coding experience.

@sboulema
Copy link
Owner Author

Unfortunately no news on C++ support. I'm not a C++ developer so it will be difficult for me to correctly write the parsing logic. So I am afraid I do not have the time available right now to dive into this :(

@HTD
Copy link

HTD commented Jul 22, 2022

For what I know - C++ (and probably C too) is unparsable. I mean - to get the full picture of the code you probably need to complete what pre-processor does and then do entire lexing and mabe even part of compiling. The problem is probably with macros, pramgas and includes. Macros can contain code similar to basic C, but AFAIK the syntax is different. BUT - VS probably does that for us. It holds it somewhere and it's probable available via its API. So - I'd say impossible with parsing, but probably doable using VS API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement marketplace Sourced from the VS Marketplace
Projects
None yet
Development

No branches or pull requests

3 participants