@@ This doesn't do any parameter matching. Simply returns the first function with that name.
| 80 | |
| 81 | // @@ This doesn't do any parameter matching. Simply returns the first function with that name. |
| 82 | HLSLFunction *HLSLTree::FindFunction(const char *name) |
| 83 | { |
| 84 | HLSLStatement *statement = m_root->statement; |
| 85 | while (statement != NULL) { |
| 86 | if (statement->nodeType == HLSLNodeType_Function) { |
| 87 | HLSLFunction *function = (HLSLFunction *)statement; |
| 88 | if (String_Equal(name, function->name)) { |
| 89 | return function; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | statement = statement->nextStatement; |
| 94 | } |
| 95 | |
| 96 | return NULL; |
| 97 | } |
| 98 | |
| 99 | HLSLDeclaration *HLSLTree::FindGlobalDeclaration(const char *name, HLSLBuffer **buffer_out /*=NULL*/) |
| 100 | { |
no test coverage detected