Skip to content

Announcement: EOL of cppast #173

Open
@foonathan

Description

@foonathan

I think cppast has reached the end of its usefulness.

  • I have no longer a personal use case for cppast, so I am not motivated to spend my free time on it.
  • It is missing many modern post-C++17 features and requires a lot of work to bring it up to date. I no longer have the time for it.
  • clang has learned the ability to dump the AST as JSON, which is better than cppast in any way: It works for everything clang is able to compile, gives more information, and also supports statements and expressions.
  • In principle, we could give cppast another frontend that parses the JSON output and creates the cppast data structures from it. I've started that in feature/json, but don't have the time to finish it.

So I recommend everybody that is still using cppast to migrate over to the AST clang dump. Running clang++ -fsyntax-only -Xclang -ast-dump=json file.cpp will output the AST as JSON, which can then be trivially parsed using e.g. python to do whatever is necessary. The only downside is that clang doesn't guarantee stability of the AST output.

So unless someone is willing to step up and maintain cppast by 2023-08-01 I will archive the repository. Thanks for all the stars and users and I'm sorry if I've let you down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions