Blender V5.3
blender::gpu::shader::parser::ast::NodeData Struct Reference

#include <ast.hh>

Public Member Functions

 NodeData ()=default
 NodeData (Nodes &nodes, NodeID id, NodeID parent_id, lexit::Token tok, NodeType type)
std::string location (const ParserBase &parser) const

Public Attributes

NodeType type = NodeType::Invalid
TokenID front = -1
TokenID back = -1
NodeID parent = -1
NodeID prev = -1
NodeID next = -1
NodeID child_first = -1
NodeID child_last = -1

Detailed Description

Immutable AST node data. Contains indices of its neighbor and the token range it covers.

A node cannot overlap with its neighbors. All nodes are stored in source order.

Definition at line 103 of file ast.hh.

Constructor & Destructor Documentation

◆ NodeData() [1/2]

blender::gpu::shader::parser::ast::NodeData::NodeData ( )
default

Referenced by NodeData().

◆ NodeData() [2/2]

blender::gpu::shader::parser::ast::NodeData::NodeData ( Nodes & nodes,
NodeID id,
NodeID parent_id,
lexit::Token tok,
NodeType type )
inline

Definition at line 118 of file ast.hh.

References back, child_first, child_last, front, NodeData(), parent, and type.

Member Function Documentation

◆ location()

std::string blender::gpu::shader::parser::ast::NodeData::location ( const ParserBase & parser) const

Member Data Documentation

◆ back

TokenID blender::gpu::shader::parser::ast::NodeData::back = -1

Definition at line 108 of file ast.hh.

Referenced by NodeData().

◆ child_first

NodeID blender::gpu::shader::parser::ast::NodeData::child_first = -1

Definition at line 114 of file ast.hh.

Referenced by NodeData().

◆ child_last

NodeID blender::gpu::shader::parser::ast::NodeData::child_last = -1

Definition at line 114 of file ast.hh.

Referenced by NodeData().

◆ front

TokenID blender::gpu::shader::parser::ast::NodeData::front = -1

Definition at line 107 of file ast.hh.

Referenced by location(), and NodeData().

◆ next

NodeID blender::gpu::shader::parser::ast::NodeData::next = -1

Definition at line 112 of file ast.hh.

◆ parent

NodeID blender::gpu::shader::parser::ast::NodeData::parent = -1

Definition at line 110 of file ast.hh.

Referenced by NodeData().

◆ prev

NodeID blender::gpu::shader::parser::ast::NodeData::prev = -1

Definition at line 112 of file ast.hh.

◆ type

NodeType blender::gpu::shader::parser::ast::NodeData::type = NodeType::Invalid

Definition at line 104 of file ast.hh.

Referenced by NodeData().


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