Expand description
The language-agnostic intermediate representation (IR) that the complexity engine scores.
A language adapter (e.g. cccc-typescript) lowers its native AST into a
Vec<Node> describing only the constructs that affect Cognitive / Cyclomatic
Complexity — branches, loops, switches, exception handlers, logical-operator
sequences, function boundaries, and calls. Everything else collapses into
Node::Group, which is a transparent container the engine simply recurses
into. All scoring rules live in crate::engine; the IR carries no scores.
The top level handed to the engine is itself a &[Node], representing
module-level code; the engine scores it under an implicit module frame.
Structs§
- Switch
Case - One arm of a
Node::Switch.