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