14using namespace blender::gpu::shader::parser::ast;
22 auto [args, args_debug] = mangled;
24 string full_id = string(
id().
str()) +
"<" + args_debug.substr(2) +
">";
31 if constexpr (is_same_v<T, SymbolFunction>) {
38 return {it->second, full_id, err};
49 if (tmp_arg_count == 0) {
58 if (tmp_arg.identifier().str() == arg.type().identifier().str()) {
79 vector<SymbolClass *> arg_cls;
82 arg_cls.emplace_back(
result.type);
87 if (i < arg_cls.size()) {
88 result.str +=
"T" + arg_cls[i]->identifier;
89 result.str_debug +=
", " + arg_cls[i]->identifier;
104 if constexpr (is_same_v<T, SymbolClass>) {
114 auto [args, args_debug] = mangled;
119 string(
id().
str()) +
"<" + args_debug.substr(2) +
">'"};
125 return {it->second, err};
SymbolTemplate< SymbolFunction > SymbolFunctionTemplate
@ CompilerErrorADLOnTypesNotAllowed
@ TemplateMissingExplicitArguments
@ TemplateMissingInstantiation
FuncArgList arguments() const
TypedChildRange< NodeT > children_of_type() const
TemplateArgList arguments() const
AstNodeException(ast::Node node, Diag diag, const string ¶m1="", const string ¶m2="", const string ¶m3="")
Result< SymbolFunction * > lookup_function(const SymbolTable &table, ast::IdQualified id, optional< SourceLocation > loc=nullopt) const
Result< SymbolClass * > lookup_class(const SymbolTable &table, ast::IdQualified id, optional< SourceLocation > loc=nullopt) const
static constexpr const char * err_symbol
Result< StringPair > mangle_identifier(ast::TemplateArgList args, ast::TemplateParamList list, const SymbolScope &scope) const
Result< ExpressionResult > expr_type_analysis(const SymbolScope &scope, ast::Node start_node, bool is_reference=false) const
vector< int > temp_arg_index_in_fn_arg
Result< T * > lookup_adl(const SymbolTable &symbols, ast::FuncParamList list, const SymbolScope &scope) const
bool is_adl_possible() const
SymbolTemplate(ast::TemplateDecl temp)
unordered_map< string, T * > instances
ResultPair< T *, string > lookup_inst(ast::TemplateParamList list, const SymbolScope &scope, const SymbolTable &table) const