예제 #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);
            }
        }
예제 #2
0
 private ParserRuleContext GetStmtContext(Declaration target)
 {
     return(target.DeclarationType == DeclarationType.Variable
         ? (ParserRuleContext)target.GetVariableStmtContext()
         : (ParserRuleContext)target.GetConstStmtContext());
 }