MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenShadingLanguage / ASTbinary_expression

Method ASTbinary_expression

src/liboslcomp/ast.cpp:916–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

914
915
916ASTbinary_expression::ASTbinary_expression (OSLCompilerImpl *comp, Operator op,
917 ASTNode *left, ASTNode *right)
918 : ASTNode (binary_expression_node, comp, op, left, right)
919{
920 // Check for a user-overloaded function for this operator.
921 // Disallow a few ops from overloading.
922 if (op != And && op != Or) {
923 ustring funcname = ustring::format ("__operator__%s__", opword());
924 Symbol *sym = comp->symtab().find (funcname);
925 if (sym && sym->symtype() == SymTypeFunction)
926 m_function_overload = (FunctionSymbol *)sym;
927 }
928}
929
930
931

Callers

nothing calls this directly

Calls 2

symtypeMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected