| 187 | } |
| 188 | |
| 189 | TempVariableRef::SegmentType TempVariableRef::GetType() const |
| 190 | { |
| 191 | auto segment = _segment.lock(); |
| 192 | if (!segment) { |
| 193 | return SegmentType::NONE; |
| 194 | } |
| 195 | auto macro = segment->GetMacro(); |
| 196 | if (!macro) { |
| 197 | return SegmentType::NONE; |
| 198 | } |
| 199 | |
| 200 | if (std::find(macro->Conditions().begin(), macro->Conditions().end(), |
| 201 | segment) != macro->Conditions().end()) { |
| 202 | return SegmentType::CONDITION; |
| 203 | } |
| 204 | if (std::find(macro->Actions().begin(), macro->Actions().end(), |
| 205 | segment) != macro->Actions().end()) { |
| 206 | return SegmentType::ACTION; |
| 207 | } |
| 208 | if (std::find(macro->ElseActions().begin(), macro->ElseActions().end(), |
| 209 | segment) != macro->ElseActions().end()) { |
| 210 | return SegmentType::ELSEACTION; |
| 211 | } |
| 212 | return SegmentType::NONE; |
| 213 | } |
| 214 | |
| 215 | int TempVariableRef::GetIdx() const |
| 216 | { |
no test coverage detected