예제 #1
0
 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();
 }
예제 #2
0
        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);
        }