Blender V5.3
bsl::SymbolVariable Struct Reference

#include <symbol_variable.hh>

Inherits bsl::Symbol.

Public Member Functions

 SymbolVariable (SymbolScope *parent, SymbolClass *type, ast::Declarator decl, const SymbolTable &table)
 SymbolVariable (SymbolScope *parent, SymbolClass *type, ast::EnumValue decl)
 SymbolVariable (SymbolScope *parent, SymbolClass *type, Token id, const string &str)
void set_offset (bool is_union, int &offset)
SymbolClass * parent_class ()
string value_str () const

Public Attributes

SymbolClass * type = nullptr
ast::Expr reference_value = {}
ast::Expr capacity_value = {}
ast::Expr condition = {}
ConstexprValue value = ConstexprError(0)
ResourceType res_type = ResourceType::NONE
int8_t array_dimensions = 0
int array_elements = 0
int offset = 0
int bit_offset = 0
int bit_length = 0
bool is_bitfield = false
bool is_static = false
bool is_error = false
bool is_constexpr = false
bool is_macro = false
bool is_const = false
bool is_compilation_const = false
Public Attributes inherited from bsl::Symbol
string identifier
string original
SourceLocation loc
SymbolScope * parent = nullptr

Detailed Description

Represent variable declarations, parameters, or enum values.

Definition at line 42 of file symbol_variable.hh.

Constructor & Destructor Documentation

◆ SymbolVariable() [1/3]

bsl::SymbolVariable::SymbolVariable ( SymbolScope * parent,
SymbolClass * type,
ast::Declarator decl,
const SymbolTable & table )

◆ SymbolVariable() [2/3]

bsl::SymbolVariable::SymbolVariable ( SymbolScope * parent,
SymbolClass * type,
ast::EnumValue decl )
inline

Definition at line 82 of file symbol_variable.hh.

References bsl::Symbol::identifier, is_static, bsl::Symbol::parent, str, and type.

◆ SymbolVariable() [3/3]

bsl::SymbolVariable::SymbolVariable ( SymbolScope * parent,
SymbolClass * type,
Token id,
const string & str )
inline

Definition at line 92 of file symbol_variable.hh.

References bsl::Symbol::parent, str, and type.

Member Function Documentation

◆ parent_class()

SymbolClass * bsl::SymbolVariable::parent_class ( )

Definition at line 76 of file symbol_variable.cc.

References bsl::SymbolScope::as_class(), bsl::Symbol::parent, and parent_class().

Referenced by parent_class().

◆ set_offset()

void bsl::SymbolVariable::set_offset ( bool is_union,
int & offset )

Definition at line 56 of file symbol_variable.cc.

References array_dimensions, array_elements, offset, pad, set_offset(), and type.

Referenced by set_offset().

◆ value_str()

string bsl::SymbolVariable::value_str ( ) const

Member Data Documentation

◆ array_dimensions

int8_t bsl::SymbolVariable::array_dimensions = 0

Definition at line 58 of file symbol_variable.hh.

Referenced by set_offset(), and SymbolVariable().

◆ array_elements

int bsl::SymbolVariable::array_elements = 0

Definition at line 62 of file symbol_variable.hh.

Referenced by set_offset().

◆ bit_length

int bsl::SymbolVariable::bit_length = 0

Definition at line 67 of file symbol_variable.hh.

◆ bit_offset

int bsl::SymbolVariable::bit_offset = 0

Definition at line 66 of file symbol_variable.hh.

◆ capacity_value

ast::Expr bsl::SymbolVariable::capacity_value = {}

Definition at line 49 of file symbol_variable.hh.

◆ condition

ast::Expr bsl::SymbolVariable::condition = {}

Definition at line 51 of file symbol_variable.hh.

Referenced by bsl::SymbolParser::parse_function_arguments().

◆ is_bitfield

bool bsl::SymbolVariable::is_bitfield = false

Definition at line 69 of file symbol_variable.hh.

Referenced by SymbolVariable().

◆ is_compilation_const

bool bsl::SymbolVariable::is_compilation_const = false

Definition at line 75 of file symbol_variable.hh.

Referenced by bsl::SymbolTable::expr_to_string(), and SymbolVariable().

◆ is_const

bool bsl::SymbolVariable::is_const = false

Definition at line 74 of file symbol_variable.hh.

◆ is_constexpr

bool bsl::SymbolVariable::is_constexpr = false

◆ is_error

bool bsl::SymbolVariable::is_error = false

Definition at line 71 of file symbol_variable.hh.

Referenced by bsl::SymbolTable::expr_to_string().

◆ is_macro

bool bsl::SymbolVariable::is_macro = false

Definition at line 73 of file symbol_variable.hh.

Referenced by bsl::SymbolParser::parse_preprocessor().

◆ is_static

bool bsl::SymbolVariable::is_static = false

Definition at line 70 of file symbol_variable.hh.

Referenced by SymbolVariable(), and SymbolVariable().

◆ offset

int bsl::SymbolVariable::offset = 0

Definition at line 64 of file symbol_variable.hh.

Referenced by bsl::SymbolParser::parse_var_decl(), and set_offset().

◆ reference_value

ast::Expr bsl::SymbolVariable::reference_value = {}

Definition at line 47 of file symbol_variable.hh.

◆ res_type

ResourceType bsl::SymbolVariable::res_type = ResourceType::NONE

Definition at line 56 of file symbol_variable.hh.

◆ type

SymbolClass* bsl::SymbolVariable::type = nullptr

◆ value

ConstexprValue bsl::SymbolVariable::value = ConstexprError(0)

Definition at line 54 of file symbol_variable.hh.

Referenced by bsl::SymbolParser::parse_template_arguments(), and value_str().


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