MCPcopy Create free account
hub / github.com/carbonengine/trinity / MatchParameter

Function MatchParameter

shadercompiler/SymbolTable.cpp:136–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static bool MatchParameter( ASTNode* parameter, ASTNode* argument, int& casts )
137{
138 Type argumentType = argument->GetType();
139 if( parameter->GetToken() && parameter->GetToken()->type == OP_OUT )
140 {
141 return parameter->GetType().CanImplicitCast( argumentType, casts );
142 }
143 else if( parameter->GetToken() && parameter->GetToken()->type == OP_INOUT )
144 {
145 int tmp;
146 return parameter->GetType().CanImplicitCast( argumentType, casts ) &&
147 parameter->GetType().CanImplicitCast( parameter->GetType(), tmp );
148 }
149 else
150 {
151 return argumentType.CanImplicitCast( parameter->GetType(), casts );
152 }
153}
154
155Symbol* ScopeSymbolTable::LookupFunctionDeclaration( const InlineString& name, ASTNode* header ) const
156{

Callers 1

LookupFunctionMethod · 0.85

Calls 3

GetTokenMethod · 0.80
CanImplicitCastMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected