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

#include <shader_parser.hh>

Public Member Functions

bool is_valid () const
bool is_invalid () const
IndexRange index_range () const
Token prev () const
Token next () const
Token find_next (TokenType type) const
Scope first_containing_scope_of_type (const ScopeType type) const
Token namespace_start () const
std::string full_symbol_name () const
Token next_not_whitespace () const
Scope scope () const
size_t str_index_start () const
size_t str_index_last () const
size_t str_index_last_no_whitespace () const
size_t line_start () const
size_t line_end () const
std::string str_with_whitespace () const
std::string str () const
std::string str_exclusive () const
size_t line_number () const
size_t char_number () const
std::string line_str () const
TokenType type () const
bool operator== (TokenType type) const
bool operator!= (TokenType type) const
bool operator== (char type) const
bool operator!= (char type) const
bool operator== (const Token &other) const
bool operator!= (const Token &other) const

Static Public Member Functions

static Token invalid ()
static Token from_position (const ParserData *data, int64_t index)

Public Attributes

std::string_view str_view
const ParserDatadata
int64_t index

Detailed Description

Definition at line 498 of file shader_parser.hh.

Member Function Documentation

◆ char_number()

size_t blender::gpu::shader::parser::Token::char_number ( ) const
inline

Definition at line 665 of file shader_parser.hh.

References data, and str_index_start().

Referenced by blender::gpu::shader::parser::ParserData::parse_scopes().

◆ find_next()

Token blender::gpu::shader::parser::Token::find_next ( TokenType type) const
inline

Definition at line 546 of file shader_parser.hh.

References is_valid(), next(), and type().

◆ first_containing_scope_of_type()

Scope blender::gpu::shader::parser::Token::first_containing_scope_of_type ( const ScopeType type) const
inline

◆ from_position()

◆ full_symbol_name()

std::string blender::gpu::shader::parser::Token::full_symbol_name ( ) const
inline

◆ index_range()

IndexRange blender::gpu::shader::parser::Token::index_range ( ) const
inline

Definition at line 529 of file shader_parser.hh.

References data, index, and is_invalid().

Referenced by from_position(), str_index_last(), str_index_start(), and str_with_whitespace().

◆ invalid()

Token blender::gpu::shader::parser::Token::invalid ( )
inlinestatic

◆ is_invalid()

bool blender::gpu::shader::parser::Token::is_invalid ( ) const
inline

Definition at line 523 of file shader_parser.hh.

References is_valid().

Referenced by index_range(), and type().

◆ is_valid()

bool blender::gpu::shader::parser::Token::is_valid ( ) const
inline

◆ line_end()

size_t blender::gpu::shader::parser::Token::line_end ( ) const
inline

Definition at line 622 of file shader_parser.hh.

References data, pos, and str_index_start().

◆ line_number()

size_t blender::gpu::shader::parser::Token::line_number ( ) const
inline

Definition at line 650 of file shader_parser.hh.

References data, and str_index_start().

Referenced by blender::gpu::shader::parser::ParserData::parse_scopes().

◆ line_start()

size_t blender::gpu::shader::parser::Token::line_start ( ) const
inline

Definition at line 615 of file shader_parser.hh.

References data, pos, and str_index_start().

◆ line_str()

std::string blender::gpu::shader::parser::Token::line_str ( ) const
inline

Definition at line 675 of file shader_parser.hh.

References data, and str_index_start().

Referenced by blender::gpu::shader::parser::ParserData::parse_scopes().

◆ namespace_start()

Token blender::gpu::shader::parser::Token::namespace_start ( ) const
inline

Definition at line 560 of file shader_parser.hh.

References is_valid(), prev(), and blender::gpu::shader::parser::Word.

Referenced by full_symbol_name().

◆ next()

Token blender::gpu::shader::parser::Token::next ( ) const
inline

Definition at line 541 of file shader_parser.hh.

References data, from_position(), and index.

Referenced by find_next(), and next_not_whitespace().

◆ next_not_whitespace()

Token blender::gpu::shader::parser::Token::next_not_whitespace ( ) const
inline

Definition at line 587 of file shader_parser.hh.

References next().

◆ operator!=() [1/3]

bool blender::gpu::shader::parser::Token::operator!= ( char type) const
inline

Definition at line 703 of file shader_parser.hh.

References type().

◆ operator!=() [2/3]

bool blender::gpu::shader::parser::Token::operator!= ( const Token & other) const
inline

Definition at line 712 of file shader_parser.hh.

◆ operator!=() [3/3]

bool blender::gpu::shader::parser::Token::operator!= ( TokenType type) const
inline

Definition at line 695 of file shader_parser.hh.

References type().

◆ operator==() [1/3]

bool blender::gpu::shader::parser::Token::operator== ( char type) const
inline

Definition at line 699 of file shader_parser.hh.

References type().

◆ operator==() [2/3]

bool blender::gpu::shader::parser::Token::operator== ( const Token & other) const
inline

Definition at line 708 of file shader_parser.hh.

References data, and index.

◆ operator==() [3/3]

bool blender::gpu::shader::parser::Token::operator== ( TokenType type) const
inline

Definition at line 691 of file shader_parser.hh.

References type().

◆ prev()

Token blender::gpu::shader::parser::Token::prev ( ) const
inline

Definition at line 537 of file shader_parser.hh.

References data, from_position(), and index.

Referenced by namespace_start(), and blender::gpu::shader::parser::Scope::scope().

◆ scope()

Scope blender::gpu::shader::parser::Token::scope ( ) const
inline

◆ str()

std::string blender::gpu::shader::parser::Token::str ( ) const
inline

Definition at line 633 of file shader_parser.hh.

References str(), and str_with_whitespace().

Referenced by str(), and str_exclusive().

◆ str_exclusive()

std::string blender::gpu::shader::parser::Token::str_exclusive ( ) const
inline

Definition at line 640 of file shader_parser.hh.

References str().

◆ str_index_last()

◆ str_index_last_no_whitespace()

size_t blender::gpu::shader::parser::Token::str_index_last_no_whitespace ( ) const
inline

◆ str_index_start()

◆ str_with_whitespace()

std::string blender::gpu::shader::parser::Token::str_with_whitespace ( ) const
inline

Definition at line 628 of file shader_parser.hh.

References data, index_range(), and size().

Referenced by str().

◆ type()

TokenType blender::gpu::shader::parser::Token::type ( ) const
inline

Member Data Documentation

◆ data

◆ index

int64_t blender::gpu::shader::parser::Token::index

Definition at line 503 of file shader_parser.hh.

Referenced by from_position(), index_range(), is_valid(), next(), operator==(), prev(), scope(), and type().

◆ str_view

std::string_view blender::gpu::shader::parser::Token::str_view

Definition at line 500 of file shader_parser.hh.


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