ACAV f0ba4b7c9529
Abstract Syntax Tree (AST) visualization tool for C, C++, and Objective-C
Loading...
Searching...
No Matches
acav::AstNode Class Reference

Pure data container for AST node properties. More...

#include <AstNode.h>

Public Member Functions

const AcavJsongetProperties () const
 Get node properties (kind, name, type, etc.).
AcavJsongetProperties ()
 Get mutable properties.
const SourceRangegetSourceRange () const
 Get source location range.
std::size_t getUseCount () const
 Get number of view nodes referencing this data.
void hold ()
 Increment reference count.
void release ()
 Decrement reference count.

Friends

class AstContext

Detailed Description

Pure data container for AST node properties.

Stores node metadata (kind, name, type, etc.) in JSON format. Separated from tree structure to enable deduplication. Use nlohmann/json with InternedString to deduplication.

Common properties:

  • "kind": Node kind (e.g., "FunctionDecl", "VarDecl")
  • "name": Node name (if applicable)
  • "type": Type string (if applicable)

Definition at line 162 of file AstNode.h.

Member Function Documentation

◆ getProperties() [1/2]

AcavJson & acav::AstNode::getProperties ( )
inline

Get mutable properties.

Definition at line 167 of file AstNode.h.

◆ getProperties() [2/2]

const AcavJson & acav::AstNode::getProperties ( ) const
inline

Get node properties (kind, name, type, etc.).

Definition at line 165 of file AstNode.h.

◆ getSourceRange()

const SourceRange & acav::AstNode::getSourceRange ( ) const
inline

Get source location range.

Definition at line 169 of file AstNode.h.

◆ getUseCount()

std::size_t acav::AstNode::getUseCount ( ) const
inline

Get number of view nodes referencing this data.

Definition at line 172 of file AstNode.h.

◆ hold()

void acav::AstNode::hold ( )
inline

Increment reference count.

Definition at line 174 of file AstNode.h.

◆ release()

void acav::AstNode::release ( )
inline

Decrement reference count.

Definition at line 176 of file AstNode.h.

◆ AstContext

friend class AstContext
friend

Definition at line 184 of file AstNode.h.


The documentation for this class was generated from the following files: