| 67 | } |
| 68 | |
| 69 | void cSymbolTable::PopScope() |
| 70 | { |
| 71 | m_deactivate_cycle++; |
| 72 | |
| 73 | for (int i = 0; i < m_sym_tbl.GetSize(); i++) { |
| 74 | sSymbolEntry* se = m_sym_tbl[i]; |
| 75 | if (se->scope == m_scope && !se->deactivate) { |
| 76 | if (se->shadow == -1) m_sym_dict.Remove(se->name); |
| 77 | else m_sym_dict.SetValue(se->name, se->shadow); |
| 78 | se->deactivate = m_deactivate_cycle; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | for (int i = 0; i < m_fun_tbl.GetSize(); i++) { |
| 83 | sFunctionEntry* fe = m_fun_tbl[i]; |
| 84 | if (fe->scope == m_scope && !fe->deactivate) { |
| 85 | if (fe->shadow == -1) m_fun_dict.Remove(fe->name); |
| 86 | else m_fun_dict.SetValue(fe->name, fe->shadow); |
| 87 | fe->deactivate = m_deactivate_cycle; |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | m_return = false; |
| 92 | m_scope--; |
| 93 | } |
| 94 |
no test coverage detected