public override string VisitSingleOutcome([NotNull] WordLangParser.SingleOutcomeContext context) { if (context.outcomeSetter() != null) { return(Visit(context.outcomeSetter())); } if (context.outcomeFunction() != null) { return(Visit(context.outcomeFunction())); } if (context.outcomePass() != null) { return(Visit(context.outcomePass())); } throw new InvalidOperationException(); }
public override List <GeneralError> VisitSingleOutcome([NotNull] WordLangParser.SingleOutcomeContext context) { var errs = new List <GeneralError>(); //var modifierErrs = context.outcomeModifier()?.Accept(this); //if (modifierErrs != null) //{ // errs.AddRange(modifierErrs); //} var setterErrs = context.outcomeSetter()?.Accept(this); if (setterErrs != null) { errs.AddRange(setterErrs); } return(errs); }