| 49 | } |
| 50 | |
| 51 | bool HasUsedDeclarations( ASTNode* node ) |
| 52 | { |
| 53 | for( unsigned i = 0; i < node->GetChildrenCount(); ++i ) |
| 54 | { |
| 55 | if( node->GetChild( i ) ) |
| 56 | { |
| 57 | if( node->GetChild( i )->GetNodeType() == NT_VAR_DECLARATION_LIST ) |
| 58 | { |
| 59 | if( HasUsedDeclarations( node->GetChild( i ) ) ) |
| 60 | { |
| 61 | return true; |
| 62 | } |
| 63 | } |
| 64 | else if( node->GetChild( i )->GetNodeType() == NT_NAME_DECLARATION ) |
| 65 | { |
| 66 | if( node->GetChild( i )->GetSymbol() && node->GetChild( i )->GetSymbol()->used ) |
| 67 | { |
| 68 | return true; |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | return false; |
| 74 | } |
| 75 | |
| 76 | std::map<int, std::string> s_operators = { |
| 77 | { OP_MUL_ASSIGN, "*=" }, |
no test coverage detected