void UnaryOpExpression::analyzeProgram(AnalysisResultPtr ar) {
  if (ar->getPhase() == AnalysisResult::AnalyzeFinal && m_op == '@') {
    StatementPtr stmt = ar->getStatementForSilencer();
    ASSERT(stmt);
    m_silencer = stmt->requireSilencers(1);
  }
  if (m_exp) m_exp->analyzeProgram(ar);
  if (ar->getPhase() == AnalysisResult::AnalyzeFinal && m_op == '@') {
    StatementPtr stmt = ar->getStatementForSilencer();
    ASSERT(stmt);
    stmt->endRequireSilencers(m_silencer);
  }
}
Esempio n. 2
0
void UnaryOpExpression::analyzeProgram(AnalysisResultPtr ar) {
    if (ar->getPhase() == AnalysisResult::AnalyzeFinal && m_op == '@') {
        StatementPtr stmt = ar->getStatementForSilencer();
        ASSERT(stmt);
        m_silencer = stmt->requireSilencers(1);
    }
    if (ar->isFirstPass()) {
        ConstructPtr self = shared_from_this();
        if (m_op == T_INCLUDE || m_op == T_REQUIRE) {
            ar->getCodeError()->record(self, CodeError::UseInclude, self);
        }
    }
    if (m_exp) m_exp->analyzeProgram(ar);
    if (ar->getPhase() == AnalysisResult::AnalyzeFinal && m_op == '@') {
        StatementPtr stmt = ar->getStatementForSilencer();
        ASSERT(stmt);
        stmt->endRequireSilencers(m_silencer);
    }
}