nixd
Loading...
Searching...
No Matches
nixf::Node Class Referenceabstract

#include <Basic.h>

Inheritance diagram for nixf::Node:
[legend]

Public Types

enum  NodeKind { NK_BeginExpr , NK_EndExpr }
 
using ChildVector = boost::container::small_vector<Node *, 8>
 

Public Member Functions

NodeKind kind () const
 
LexerCursorRange range () const
 
PositionRange positionRange () const
 
LexerCursor lCur () const
 
LexerCursor rCur () const
 
const char * name () const
 
virtual ChildVector children () const =0
 
virtual ~Node ()=default
 
const Nodedescend (PositionRange Range) const
 Descendant node that contains the given range.
 
std::string_view src (std::string_view Src) const
 

Static Public Member Functions

static const char * name (NodeKind Kind)
 

Protected Member Functions

 Node (NodeKind Kind, LexerCursorRange Range)
 

Detailed Description

Definition at line 12 of file Basic.h.

Member Typedef Documentation

◆ ChildVector

using nixf::Node::ChildVector = boost::container::small_vector<Node *, 8>

Definition at line 42 of file Basic.h.

Member Enumeration Documentation

◆ NodeKind

Enumerator
NK_BeginExpr 

provides NODE(NAME) EXPR(NAME)

${ expr }

Misc node used for parentheses keywords etc.

See also
Misc
NK_EndExpr 

provides NODE(NAME) EXPR(NAME)

Definition at line 14 of file Basic.h.

Constructor & Destructor Documentation

◆ Node()

nixf::Node::Node ( NodeKind Kind,
LexerCursorRange Range )
inlineexplicitprotected

Definition at line 30 of file Basic.h.

◆ ~Node()

virtual nixf::Node::~Node ( )
virtualdefault

Member Function Documentation

◆ children()

◆ descend()

const Node * nixf::Node::descend ( PositionRange Range) const
inlinenodiscard

Descendant node that contains the given range.

Definition at line 49 of file Basic.h.

References children(), and positionRange().

◆ kind()

◆ lCur()

LexerCursor nixf::Node::lCur ( ) const
inlinenodiscard

Definition at line 37 of file Basic.h.

Referenced by nixf::Sema::checkFormalSep(), nixf::Parser::parseExprSelect(), and src().

◆ name() [1/2]

const char * nixf::Node::name ( ) const
inlinenodiscard

Definition at line 40 of file Basic.h.

References name().

Referenced by name().

◆ name() [2/2]

const char * Node::name ( NodeKind Kind)
staticnodiscard

provides NODE(NAME) EXPR(NAME)

${ expr }

Misc node used for parentheses keywords etc.

See also
Misc

Definition at line 35 of file Nodes.cpp.

◆ positionRange()

PositionRange nixf::Node::positionRange ( ) const
inlinenodiscard

Definition at line 36 of file Basic.h.

Referenced by descend().

◆ range()

◆ rCur()

LexerCursor nixf::Node::rCur ( ) const
inlinenodiscard

Definition at line 38 of file Basic.h.

Referenced by nixf::Sema::checkFormalEllipsis(), and src().

◆ src()

std::string_view nixf::Node::src ( std::string_view Src) const
inlinenodiscard

Definition at line 63 of file Basic.h.

References lCur(), nixf::LexerCursor::offset(), and rCur().

Referenced by nixf::Sema::checkFormalEllipsis().


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