ACAV 69797fb42a2b
Abstract Syntax Tree (AST) visualization tool for C, C++, and Objective-C
Loading...
Searching...
No Matches
acav::Interval Struct Reference

Represents an interval in source code with associated AST node. More...

#include <SourceLocationIndex.h>

Public Member Functions

bool contains (unsigned line, unsigned column) const
 Check if interval contains a point.
bool operator< (const Interval &other) const
 Compare intervals by start position for sorting.

Public Attributes

unsigned beginLine
unsigned beginColumn
unsigned endLine
unsigned endColumn
AstViewNode * node

Detailed Description

Represents an interval in source code with associated AST node.

Definition at line 38 of file SourceLocationIndex.h.

Member Function Documentation

◆ contains()

bool acav::Interval::contains ( unsigned line,
unsigned column ) const

Check if interval contains a point.

Parameters
lineLine number (1-based)
columnColumn number (1-based)
Returns
true if point is within interval (inclusive)

Definition at line 34 of file SourceLocationIndex.cpp.

◆ operator<()

bool acav::Interval::operator< ( const Interval & other) const

Compare intervals by start position for sorting.

Definition at line 45 of file SourceLocationIndex.cpp.

Member Data Documentation

◆ beginColumn

unsigned acav::Interval::beginColumn

Definition at line 40 of file SourceLocationIndex.h.

◆ beginLine

unsigned acav::Interval::beginLine

Definition at line 39 of file SourceLocationIndex.h.

◆ endColumn

unsigned acav::Interval::endColumn

Definition at line 42 of file SourceLocationIndex.h.

◆ endLine

unsigned acav::Interval::endLine

Definition at line 41 of file SourceLocationIndex.h.

◆ node

AstViewNode* acav::Interval::node

Definition at line 43 of file SourceLocationIndex.h.


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