Esempio n. 1
0
        private static ParserRuleContext GetStmtContext(Declaration target)
        {
            switch (target.DeclarationType)
            {
            case DeclarationType.Variable:
                return(target.GetVariableStmtContext());

            case DeclarationType.Constant:
                return(target.GetConstStmtContext());

            default:
                return(target.Context);
            }
        }
Esempio n. 2
0
 private ParserRuleContext GetStmtContext(Declaration target)
 {
     return(target.DeclarationType == DeclarationType.Variable
         ? (ParserRuleContext)target.GetVariableStmtContext()
         : (ParserRuleContext)target.GetConstStmtContext());
 }