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

Function CollectFunctions

shadercompiler/EffectCompilerMetal.cpp:180–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void CollectFunctions( ParserState& state, std::map<Symbol*, ASTNode*>& functions )
181{
182 ZoneScoped;
183
184 ASTNode* root = state.GetTree();
185 if( !root )
186 {
187 return;
188 }
189
190 for( size_t i = 0, n = root->GetChildrenCount(); i < n; ++i )
191 {
192 ASTNode* node = root->GetChild( i );
193 if( node && node->GetNodeType() == NT_FUNCTION_DEFINITION )
194 {
195 ASTNode* header = node->GetChild( 0 );
196 assert( header->GetNodeType() == NT_FUNCTION_HEADER );
197
198 functions[header->GetSymbol()] = node;
199 }
200 }
201}
202
203void AddStructDotPrefix( ASTNode* node, const std::set<Symbol*>& structMembers, Symbol* symbol )
204{

Callers 1

CompileEffectMethod · 0.85

Calls 5

GetTreeMethod · 0.80
GetChildrenCountMethod · 0.80
GetNodeTypeMethod · 0.80
GetSymbolMethod · 0.80
GetChildMethod · 0.45

Tested by

no test coverage detected