TODO: child funcdef: Should try to eliminate this function. GetNameSpaceFromNode is more complete
| 6066 | |
| 6067 | // TODO: child funcdef: Should try to eliminate this function. GetNameSpaceFromNode is more complete |
| 6068 | asCString asCBuilder::GetScopeFromNode(asCScriptNode *node, asCScriptCode *script, asCScriptNode **next) |
| 6069 | { |
| 6070 | if (node->nodeType != snScope) |
| 6071 | { |
| 6072 | if (next) |
| 6073 | *next = node; |
| 6074 | return ""; |
| 6075 | } |
| 6076 | |
| 6077 | asCString scope; |
| 6078 | asCScriptNode *sn = node->firstChild; |
| 6079 | if( sn->tokenType == ttScope ) |
| 6080 | { |
| 6081 | scope = "::"; |
| 6082 | sn = sn->next; |
| 6083 | } |
| 6084 | |
| 6085 | // TODO: child funcdef: A scope can have a template type as the innermost |
| 6086 | while( sn && sn->next && sn->next->tokenType == ttScope ) |
| 6087 | { |
| 6088 | asCString tmp; |
| 6089 | tmp.Assign(&script->code[sn->tokenPos], sn->tokenLength); |
| 6090 | if( scope != "" && scope != "::" ) |
| 6091 | scope += "::"; |
| 6092 | scope += tmp; |
| 6093 | sn = sn->next->next; |
| 6094 | } |
| 6095 | |
| 6096 | if( next ) |
| 6097 | *next = node->next; |
| 6098 | |
| 6099 | return scope; |
| 6100 | } |
| 6101 | |
| 6102 | bool asCBuilder::FindObjectTypeOrMixinInNsHierarchy(const asCString& name, asSNameSpace* startNs, bool isExplicitNs, asCScriptNode *errNode, asCScriptCode *script, asCObjectType **outObjType, sMixinClass **outMixin) |
| 6103 | { |
no test coverage detected