Blender V5.3
lexit::Token Struct Reference

#include <lexit.hh>

Inherited by blender::gpu::shader::parser::Token, and lexit::TokenMut.

Public Member Functions

 Token (const TokenBuffer *buf, int32_t index)
 operator int32_t () const
bool is_valid () const
bool is_invalid () const
const TokenType & type () const
const TokenAtom & atom () const
std::string_view str () const
std::string_view str_with_whitespace () const
bool followed_by_whitespace () const
Token next (int i=1) const
Token prev (int i=1) const

Static Public Member Functions

static Token invalid (const TokenBuffer *buf)

Public Attributes

const TokenBuffer * buf_
int32_t index_
int32_t flag = 0

Friends

bool operator== (const Token &a, const Token &b)
bool operator!= (const Token &a, const Token &b)
bool operator== (const Token &a, TokenType b)
bool operator!= (const Token &a, TokenType b)

Detailed Description

Definition at line 44 of file lexit.hh.

Constructor & Destructor Documentation

◆ Token()

Member Function Documentation

◆ atom()

const TokenAtom & lexit::Token::atom ( ) const
inline

◆ followed_by_whitespace()

bool lexit::Token::followed_by_whitespace ( ) const
inline

◆ invalid()

Token lexit::Token::invalid ( const TokenBuffer * buf)
inlinestatic

◆ is_invalid()

◆ is_valid()

◆ next()

◆ operator int32_t()

lexit::Token::operator int32_t ( ) const
inlineexplicit

Definition at line 60 of file lexit.hh.

References index_.

◆ prev()

◆ str()

◆ str_with_whitespace()

◆ type()

◆ operator!= [1/2]

bool operator!= ( const Token & a,
const Token & b )
friend

Definition at line 90 of file lexit.hh.

References assert, b, buf_, index_, and Token().

◆ operator!= [2/2]

bool operator!= ( const Token & a,
TokenType b )
friend

Definition at line 100 of file lexit.hh.

References b, Token(), and type().

◆ operator== [1/2]

bool operator== ( const Token & a,
const Token & b )
friend

Definition at line 85 of file lexit.hh.

References assert, b, buf_, index_, and Token().

◆ operator== [2/2]

bool operator== ( const Token & a,
TokenType b )
friend

Definition at line 96 of file lexit.hh.

References b, Token(), and type().

Member Data Documentation

◆ buf_

◆ flag

◆ index_


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