# standardese/cppast

Library to parse and work with the C++ AST

Repository: https://github.com/standardese/cppast
Canonical: https://ross.abutalabs.com/products/cppast
Language: C++
License: NOASSERTION
License Family: other
Topics: cplusplus, ast, parser-library, libclang
Last push: 2026-05-20T01:48:11+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 83, release rhythm 8, longevity 100
- inputs: {"age_days": 3434, "days_push": 106, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1783, forks 173 (observed 2026-08-28T04:05:35.805492+00:00)

## What it is
cppast is a C++ library providing a high-level interface to the C++ abstract syntax tree, built on top of libclang with workarounds for its limitations. It supports parsing source files, synthesizing AST entities, reading documentation comments, and generating code.

## Use cases
- parse C++ source files to inspect the AST
- build a C++ documentation generator
- extract documentation comments from C++ headers
- generate C++ code from parsed entities
- build a reflection tool for C++
- write a static analysis tool for C++ codebases

## When to choose
- you need a standalone C++ AST tool and libclang's raw API is too limited
- you want to build a documentation generator or reflection library for C++
- you need to synthesize AST entities or generate code, not just parse
- you want a parser backend decoupled from the AST representation

## When to avoid
- you need to parse function bodies or full expression/statement information
- you need to modify parsed entities (they are immutable)
- you are working in a language other than C++
- you need guaranteed support for rare edge cases in the C++ grammar

## Facets
- artifact type: library
- maturity: active
- function: parser, compiler, documentation, developer-tools
- domain: parsers, developer-tools, documentation, programming-languages
- platform: cpp, cross-platform, cli
- tags: cpp-ast, libclang, code-generation, documentation-comments, reflection

## Member repositories
- standardese/cppast (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:35.805492+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:24:19.548853+00:00, confidence not recorded.
  - readme: https://github.com/standardese/cppast (fetched 2026-08-28T04:05:35.805492+00:00, sha 18811171c093)
- Data as of 2026-08-30T08:39:29.467469+00:00.
