|
Blender V5.3
|
#include <symbol_scope.hh>
Inherits bsl::Symbol.
Inherited by bsl::SymbolClass, and bsl::SymbolFunction.
Public Types | |
| enum | Type { FUNCTION , CLASS , NAMESPACE , LOCAL , ROOT } |
Public Attributes | |
| friend | SymbolParser |
| unordered_map< string, SymbolScope * > | scopes |
| SymbolMap< SymbolVariable > | variables |
| SymbolMap< SymbolFunction > | functions |
| SymbolMap< SymbolClass > | classes |
| vector< std::pair< ast::FuncForwardDecl, SymbolFunction * > > | function_prototypes |
| optional< SourceLocation > | poi |
| enum bsl::SymbolScope::Type | type = ROOT |
| Public Attributes inherited from bsl::Symbol | |
| string | identifier |
| string | original |
| SourceLocation | loc |
| SymbolScope * | parent = nullptr |
Container for symbol visible inside a namespace scope.
Definition at line 62 of file symbol_scope.hh.
| Enumerator | |
|---|---|
| FUNCTION | |
| CLASS | |
| NAMESPACE | |
| LOCAL | |
| ROOT | |
Definition at line 90 of file symbol_scope.hh.
|
inline |
Definition at line 93 of file symbol_scope.hh.
Referenced by child_scope(), lookup_function(), parent_function(), parent_function(), print(), root_scope(), root_scope(), bsl::SymbolClass::SymbolClass(), bsl::SymbolClass::SymbolClass(), bsl::SymbolFunction::SymbolFunction(), bsl::SymbolFunction::SymbolFunction(), SymbolScope(), SymbolScope(), SymbolScope(), bsl::SymbolFunction::to_arg_types(), and bsl::SymbolFunction::to_arg_types().
|
inline |
Definition at line 95 of file symbol_scope.hh.
References bsl::Symbol::parent, SymbolScope(), and type.
|
inline |
Definition at line 100 of file symbol_scope.hh.
References LOCAL, bsl::Symbol::parent, and SymbolScope().
Definition at line 105 of file symbol_scope.hh.
References bsl::Symbol::parent, str, SymbolScope(), and type.
| SymbolClass * bsl::SymbolScope::as_class | ( | ) |
Definition at line 388 of file symbol_scope.cc.
Referenced by bsl::SymbolParser::anonymous_scope_prefix(), bsl::SymbolFunction::parent_class(), bsl::SymbolVariable::parent_class(), and bsl::SymbolParser::parse_var_decl().
| SymbolFunction * bsl::SymbolScope::as_function | ( | ) |
Definition at line 393 of file symbol_scope.cc.
| const SymbolFunction * bsl::SymbolScope::as_function | ( | ) | const |
Definition at line 397 of file symbol_scope.cc.
| SymbolScope * bsl::SymbolScope::child_scope | ( | int | n | ) |
Definition at line 478 of file symbol_scope.cc.
References scopes, SymbolScope(), and to_string().
| bool bsl::SymbolScope::function_emplace | ( | SymbolFunction * | fn, |
| bool | builtin = false ) |
Definition at line 419 of file symbol_scope.cc.
References functions, blender::result, and scopes.
Referenced by bsl::SymbolParser::parse_func_forward_decl().
| Result< SymbolClass * > bsl::SymbolScope::lookup_class | ( | const SymbolTable & | table, |
| ast::Id | id, | ||
| ast::Id | last, | ||
| optional< SourceLocation > | loc = nullopt ) const |
Definition at line 108 of file symbol_scope.cc.
References bsl::Symbol::loc, LOOKUP_LOG, and bsl::resolve_template_instantiation().
| Result< SymbolClass * > bsl::SymbolScope::lookup_class | ( | const SymbolTable & | table, |
| ast::IdQualified | id, | ||
| optional< SourceLocation > | loc = nullopt ) const |
Definition at line 99 of file symbol_scope.cc.
References bsl::Symbol::loc, LOOKUP_LOG, and bsl::resolve_template_instantiation().
Referenced by bsl::ExpressionTypeParser::identifier(), bsl::SymbolTemplate< T >::lookup_adl(), lookup_function(), bsl::SymbolTemplate< T >::lookup_inst(), bsl::SymbolParser::parse_enum_value(), bsl::SymbolParser::parse_function_arguments(), bsl::SymbolParser::parse_function_return_type(), bsl::SymbolParser::parse_loop_arguments(), bsl::SymbolParser::parse_template_arguments(), bsl::SymbolParser::parse_template_inst(), bsl::SymbolParser::parse_using_stmt(), bsl::SymbolParser::parse_var_decl(), bsl::SymbolTable::resolve_auto_type(), and bsl::SymbolFunction::to_arg_types().
| SymbolClass * bsl::SymbolScope::lookup_class | ( | string | id | ) | const |
Definition at line 370 of file symbol_scope.cc.
References classes.
| SymbolClass * bsl::SymbolScope::lookup_class_base | ( | const SymbolTable & | table, |
| ast::IdQualified | id ) const |
Definition at line 124 of file symbol_scope.cc.
References LOOKUP_LOG.
Referenced by bsl::SymbolTable::mangle_identifier(), bsl::SymbolParser::parse_template_inst(), and bsl::SymbolParser::parse_template_spec().
| Result< SymbolFunction * > bsl::SymbolScope::lookup_function | ( | const SymbolTable & | table, |
| ast::IdQualified | id, | ||
| ArgOrParamList | params, | ||
| const SymbolScope & | arguments_scope, | ||
| optional< SourceLocation > | loc = nullopt ) const |
Definition at line 49 of file symbol_scope.cc.
References blender::gpu::shader::parser::ast::Node::is_valid(), bsl::Symbol::loc, lookup_class(), lookup_function(), bsl::SymbolTable::root, str, SymbolScope(), bsl::SymbolFunction::to_arg_types(), and bsl::UnknownFunction.
| Result< SymbolFunction * > bsl::SymbolScope::lookup_function | ( | const SymbolTable & | table, |
| ast::IdQualified | id, | ||
| optional< SourceLocation > | loc = nullopt ) const |
Definition at line 39 of file symbol_scope.cc.
References bsl::Symbol::loc, LOOKUP_LOG, and bsl::resolve_template_instantiation().
Referenced by bsl::SymbolTemplate< T >::lookup_adl(), lookup_function(), bsl::SymbolTemplate< T >::lookup_inst(), bsl::SymbolFunction::lookup_overload(), and bsl::SymbolParser::parse_using_stmt().
| SymbolFunction * bsl::SymbolScope::lookup_function | ( | string | id | ) | const |
Definition at line 376 of file symbol_scope.cc.
References functions.
| SymbolFunction * bsl::SymbolScope::lookup_function_base | ( | const SymbolTable & | table, |
| ast::IdQualified | id ) const |
Definition at line 118 of file symbol_scope.cc.
References LOOKUP_LOG.
Referenced by bsl::SymbolParser::parse_template_inst(), and bsl::SymbolParser::parse_template_spec().
| std::pair< ast::FuncForwardDecl, SymbolFunction * > bsl::SymbolScope::lookup_function_forward_decl | ( | ast::FuncDecl | decl | ) | const |
Definition at line 136 of file symbol_scope.cc.
References blender::gpu::shader::parser::ast::Node::child_first(), blender::gpu::shader::parser::ast::FuncArg::declarator(), function_prototypes, blender::gpu::shader::parser::ast::Declarator::is_array(), blender::gpu::shader::parser::ast::Declarator::is_reference(), blender::gpu::shader::parser::ast::Node::is_valid(), blender::gpu::shader::parser::ast::Node::next(), blender::gpu::shader::parser::ast::Node::str(), and blender::gpu::shader::parser::ast::FuncArg::type().
| SymbolVariable * bsl::SymbolScope::lookup_variable | ( | const SymbolTable & | table, |
| ast::IdQualified | id ) const |
Definition at line 130 of file symbol_scope.cc.
References LOOKUP_LOG.
Referenced by bsl::SymbolTable::expr_to_string(), and bsl::ExpressionTypeParser::identifier().
| SymbolVariable * bsl::SymbolScope::lookup_variable | ( | string | id | ) | const |
Definition at line 382 of file symbol_scope.cc.
References variables.
| vector< SymbolVariable * > bsl::SymbolScope::non_static_variables_in_declaration_order | ( | ) | const |
Definition at line 462 of file symbol_scope.cc.
References blender::gpu::shader::metadata::assert, b, CLASS, sort(), blender::v, and variables.
Referenced by bsl::SymbolClass::ensure_size_and_align(), and bsl::SymbolParser::parse_structured_binding().
| SymbolFunction * bsl::SymbolScope::parent_function | ( | ) |
Definition at line 402 of file symbol_scope.cc.
References FUNCTION, and SymbolScope().
| const SymbolFunction * bsl::SymbolScope::parent_function | ( | ) | const |
Definition at line 410 of file symbol_scope.cc.
References FUNCTION, and SymbolScope().
| void bsl::SymbolScope::print | ( | ) | const |
Definition at line 486 of file symbol_scope.cc.
References b, lexit::Class, blender::gpu::shader::parser::Function, bsl::Symbol::identifier, bsl::Symbol::loc, max, node, blender::padding(), sort(), SymbolScope(), and type.
| SymbolScope * bsl::SymbolScope::root_scope | ( | ) |
Definition at line 183 of file symbol_scope.cc.
References bsl::Symbol::parent, and SymbolScope().
| const SymbolScope * bsl::SymbolScope::root_scope | ( | ) | const |
Definition at line 174 of file symbol_scope.cc.
References bsl::Symbol::parent, and SymbolScope().
| bool bsl::SymbolScope::variable_emplace | ( | string | id, |
| SymbolVariable * | var ) |
Definition at line 452 of file symbol_scope.cc.
References variables.
Referenced by bsl::SymbolParser::parse_enum_value(), bsl::SymbolParser::parse_function_arguments(), bsl::SymbolParser::parse_loop_arguments(), bsl::SymbolParser::parse_pipeline_decl(), bsl::SymbolParser::parse_preprocessor(), bsl::SymbolParser::parse_structured_binding(), bsl::SymbolParser::parse_template_arguments(), and bsl::SymbolParser::parse_var_decl().
| bool bsl::SymbolScope::variable_emplace | ( | SymbolVariable * | var | ) |
Definition at line 457 of file symbol_scope.cc.
References bsl::Symbol::identifier, and variables.
| SymbolMap<SymbolClass> bsl::SymbolScope::classes |
Definition at line 70 of file symbol_scope.hh.
Referenced by lookup_class(), bsl::SymbolParser::parse_preprocessor(), bsl::SymbolParser::parse_template_arguments(), bsl::SymbolParser::parse_template_decl(), bsl::SymbolParser::parse_using_stmt(), and bsl::SymbolClass::SymbolClass().
| vector<std::pair<ast::FuncForwardDecl, SymbolFunction *> > bsl::SymbolScope::function_prototypes |
Definition at line 72 of file symbol_scope.hh.
Referenced by lookup_function_forward_decl(), and bsl::SymbolParser::parse_func_forward_decl().
| SymbolMap<SymbolFunction> bsl::SymbolScope::functions |
Definition at line 69 of file symbol_scope.hh.
Referenced by function_emplace(), lookup_function(), bsl::SymbolParser::parse_function_arguments(), bsl::SymbolParser::parse_preprocessor(), bsl::SymbolParser::parse_template_decl(), and bsl::SymbolParser::parse_using_stmt().
| optional<SourceLocation> bsl::SymbolScope::poi |
Definition at line 87 of file symbol_scope.hh.
Referenced by bsl::SymbolParser::parse_func_forward_decl().
| unordered_map<string, SymbolScope *> bsl::SymbolScope::scopes |
Definition at line 66 of file symbol_scope.hh.
Referenced by child_scope(), function_emplace(), bsl::SymbolParser::parse_local_scope(), bsl::SymbolParser::parse_namespace(), and bsl::SymbolParser::parse_template_arguments().
| friend bsl::SymbolScope::SymbolParser |
Definition at line 63 of file symbol_scope.hh.
| enum bsl::SymbolScope::Type bsl::SymbolScope::type = ROOT |
| SymbolMap<SymbolVariable> bsl::SymbolScope::variables |
Definition at line 68 of file symbol_scope.hh.
Referenced by lookup_variable(), non_static_variables_in_declaration_order(), bsl::SymbolParser::parse_enum_value(), bsl::SymbolParser::parse_loop_arguments(), bsl::SymbolParser::parse_pipeline_decl(), bsl::SymbolParser::parse_structured_binding(), bsl::SymbolParser::parse_var_decl(), variable_emplace(), and variable_emplace().