MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_class_like_definition

Function is_class_like_definition

codegraph-kernel/src/ccpp/mod.rs:2673–2675  ·  view source on GitHub ↗

isClassLikeDefinition (languages/c-cpp.ts): a class/struct/union/enum specifier that carries a body defines the type; `struct Foo *p` and the forward declaration `class Foo;` only name it.

(node: Node)

Source from the content-addressed store, hash-verified

2671/// specifier that carries a body defines the type; `struct Foo *p` and the
2672/// forward declaration `class Foo;` only name it.
2673fn is_class_like_definition(node: Node) -> bool {
2674 is_class_like_specifier(node.kind()) && node.child_by_field_name("body").is_some()
2675}
2676
2677/// isUnnamedMemberType (languages/c-cpp.ts): its members are its holder's.
2678fn is_unnamed_member_type(specifier: Node) -> bool {

Callers 2

dispatch_nodeMethod · 0.85
defining_declarationFunction · 0.85

Calls 1

is_class_like_specifierFunction · 0.85

Tested by

no test coverage detected