Blender V5.0
blender::gpu::shader::parser::ParserData Struct Reference

#include <shader_parser.hh>

Public Types

using report_callback

Public Member Functions

void tokenize (const bool keep_whitespace)
void parse_scopes (report_callback &report_error)

Public Attributes

std::string str
std::string token_types
std::string scope_types
OffsetIndices token_offsets
std::vector< int > token_scope
std::vector< IndexRangescope_ranges

Detailed Description

Definition at line 174 of file shader_parser.hh.

Member Typedef Documentation

◆ report_callback

Initial value:
std::function<void(
int error_line, int error_char, std::string error_line_string, const char *error_str)>

Definition at line 421 of file shader_parser.hh.

Member Function Documentation

◆ parse_scopes()

void blender::gpu::shader::parser::ParserData::parse_scopes ( report_callback & report_error)
inline

Definition at line 988 of file shader_parser.hh.

References blender::gpu::shader::parser::AngleClose, blender::gpu::shader::parser::AngleOpen, blender::gpu::shader::parser::Assign, blender::gpu::shader::parser::Assignment, blender::gpu::shader::parser::BracketClose, blender::gpu::shader::parser::BracketOpen, blender::gpu::shader::parser::Token::char_number(), blender::gpu::shader::parser::Colon, blender::gpu::shader::parser::Comma, blender::gpu::shader::parser::Enum, blender::gpu::shader::parser::For, blender::gpu::shader::parser::Token::from_position(), blender::gpu::shader::parser::Function, blender::gpu::shader::parser::FunctionArg, blender::gpu::shader::parser::FunctionArgs, blender::gpu::shader::parser::FunctionCall, blender::gpu::shader::parser::Global, blender::gpu::shader::parser::Hash, i, blender::gpu::shader::parser::Invalid, blender::gpu::shader::parser::Token::line_number(), blender::gpu::shader::parser::Token::line_str(), blender::gpu::shader::parser::Local, blender::gpu::shader::parser::LoopArg, blender::gpu::shader::parser::LoopArgs, blender::gpu::shader::parser::LoopBody, blender::gpu::shader::parser::Namespace, blender::gpu::shader::parser::NewLine, blender::gpu::shader::parser::ParClose, blender::gpu::shader::parser::ParOpen, pos, blender::gpu::shader::parser::Preprocessor, scope_ranges, scope_types, blender::gpu::shader::parser::SemiColon, size(), blender::gpu::shader::parser::SquareClose, blender::gpu::shader::parser::SquareOpen, str, blender::gpu::shader::parser::Struct, blender::gpu::shader::parser::Subscript, blender::gpu::shader::parser::Switch, blender::gpu::shader::parser::SwitchArg, blender::gpu::shader::parser::SwitchBody, blender::gpu::shader::parser::Template, blender::gpu::shader::parser::TemplateArg, token_offsets, token_scope, token_types, blender::gpu::shader::parser::While, and blender::gpu::shader::parser::Word.

◆ tokenize()

void blender::gpu::shader::parser::ParserData::tokenize ( const bool keep_whitespace)
inline

Definition at line 187 of file shader_parser.hh.

References blender::gpu::shader::parser::Assign, blender::gpu::shader::parser::Backslash, blender::gpu::shader::parser::Break, blender::gpu::shader::parser::Case, blender::gpu::shader::parser::Class, blender::gpu::shader::parser::Const, blender::gpu::shader::parser::Constexpr, blender::gpu::shader::parser::Continue, blender::gpu::shader::parser::Decrement, blender::gpu::shader::parser::Deref, blender::gpu::shader::parser::Do, blender::gpu::shader::parser::Dot, blender::gpu::shader::parser::Else, blender::gpu::shader::parser::Enum, blender::gpu::shader::parser::Equal, blender::gpu::shader::parser::For, blender::gpu::shader::parser::GEqual, blender::gpu::shader::parser::Hash, blender::gpu::shader::parser::If, blender::gpu::shader::parser::Increment, blender::gpu::shader::parser::LEqual, blender::gpu::shader::parser::Namespace, blender::gpu::shader::parser::NewLine, blender::gpu::shader::parser::NotEqual, blender::gpu::shader::parser::Number, blender::gpu::shader::parser::PreprocessorNewline, blender::gpu::shader::parser::Private, blender::gpu::shader::parser::Public, blender::gpu::shader::parser::Return, blender::gpu::shader::parser::IndexRange::size, blender::gpu::shader::parser::Space, blender::gpu::shader::parser::IndexRange::start, blender::gpu::shader::parser::Static, str, blender::gpu::shader::parser::Struct, blender::gpu::shader::parser::Switch, blender::gpu::shader::parser::Template, blender::gpu::shader::parser::This, token_offsets, token_types, blender::gpu::shader::parser::Using, blender::gpu::shader::parser::While, and blender::gpu::shader::parser::Word.

Member Data Documentation

◆ scope_ranges

std::vector<IndexRange> blender::gpu::shader::parser::ParserData::scope_ranges

Definition at line 184 of file shader_parser.hh.

Referenced by parse_scopes().

◆ scope_types

std::string blender::gpu::shader::parser::ParserData::scope_types

Definition at line 178 of file shader_parser.hh.

Referenced by parse_scopes().

◆ str

◆ token_offsets

OffsetIndices blender::gpu::shader::parser::ParserData::token_offsets

Definition at line 180 of file shader_parser.hh.

Referenced by parse_scopes(), and tokenize().

◆ token_scope

std::vector<int> blender::gpu::shader::parser::ParserData::token_scope

Definition at line 182 of file shader_parser.hh.

Referenced by parse_scopes().

◆ token_types

std::string blender::gpu::shader::parser::ParserData::token_types

Definition at line 177 of file shader_parser.hh.

Referenced by parse_scopes(), and tokenize().


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