nixd
|
#include <Basic.h>
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 Node * | descend (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) | |
using nixf::Node::ChildVector = boost::container::small_vector<Node *, 8> |
enum nixf::Node::NodeKind |
Enumerator | |
---|---|
NK_BeginExpr | provides NODE(NAME) EXPR(NAME) ${ expr } Misc node used for parentheses keywords etc.
|
NK_EndExpr | provides NODE(NAME) EXPR(NAME) |
|
inlineexplicitprotected |
|
virtualdefault |
|
nodiscardpure virtual |
Implemented in nixf::AttrName, nixf::AttrPath, nixf::Binding, nixf::Binds, nixf::Dot, nixf::ExprAssert, nixf::ExprAttrs, nixf::ExprBinOp, nixf::ExprCall, nixf::ExprFloat, nixf::ExprIf, nixf::ExprInt, nixf::ExprLambda, nixf::ExprLet, nixf::ExprList, nixf::ExprOp, nixf::ExprOpHasAttr, nixf::ExprParen, nixf::ExprPath, nixf::ExprSelect, nixf::ExprSPath, nixf::ExprString, nixf::ExprUnaryOp, nixf::ExprVar, nixf::ExprWith, nixf::Formal, nixf::Formals, nixf::Identifier, nixf::Inherit, nixf::InterpolatedParts, nixf::Interpolation, nixf::LambdaArg, nixf::Misc, and nixf::Op.
Referenced by descend().
|
inlinenodiscard |
Descendant node that contains the given range.
Definition at line 49 of file Basic.h.
References children(), and positionRange().
|
inlinenodiscard |
Definition at line 34 of file Basic.h.
Referenced by nixf::Expr::classof(), nixd::findDefinition(), nixd::getScopeAndPrefix(), nixd::havePackageScope(), nixf::EnvNode::isWith(), nixf::Expr::maybeLambda(), nixd::idioms::mkSelector(), nixd::idioms::mkVarSelector(), nixf::ParentMapAnalysis::upExpr(), and nixf::ParentMapAnalysis::upTo().
|
inlinenodiscard |
Definition at line 37 of file Basic.h.
Referenced by nixf::Sema::checkFormalSep(), nixf::Parser::parseExprSelect(), and src().
|
inlinenodiscard |
|
staticnodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
Definition at line 35 of file Basic.h.
Referenced by nixf::Sema::checkAttrRecursiveForMerge(), nixf::Sema::checkFormalEllipsis(), nixf::Sema::checkFormalEmpty(), nixf::Sema::checkFormalSep(), nixf::Sema::dedupFormal(), nixf::Parser::parseExprLet(), and nixf::Sema::removeFormal().
|
inlinenodiscard |
Definition at line 38 of file Basic.h.
Referenced by nixf::Sema::checkFormalEllipsis(), and src().
|
inlinenodiscard |
Definition at line 63 of file Basic.h.
References lCur(), nixf::LexerCursor::offset(), and rCur().
Referenced by nixf::Sema::checkFormalEllipsis().