コード例 #1
0
        public void Check()
        {
            // If no lambda was expected, throw an error since the parameter types can not be determined.
            if (ParseInfo.ExpectingLambda == null)
            {
                // Parameter data is known.
                if (ParameterState == ParameterState.CountAndTypesKnown)
                {
                    Applier.GetLambdaStatement();
                }
                else
                {
                    ParseInfo.Script.Diagnostics.Error(ErrorMessage, Range);
                }
            }

            // The arrow registration occurs now, parse the statement.
            else if (!ParseInfo.ExpectingLambda.RegisterOccursLater)
            {
                Applier.GetLambdaStatement(ParseInfo.ExpectingLambda.Type);
            }

            // Default
            else
            {
                Applier.GetLambdaStatement();
            }
        }
コード例 #2
0
 public void Apply(ILambdaApplier applier)
 {
     if (!RegisterOccursLater)
     {
         // The arrow registration occurs now, parse the statement.
         applier.GetLambdaStatement(Type);
     }
     else
     {
         // Otherwise, add it to the _apply list so we can apply it later.
         _apply.Add(applier);
     }
 }
コード例 #3
0
 public void Check()
 {
     // If no lambda was expected, throw an error since the parameter types can not be determined.
     if (ParseInfo.ExpectingLambda == null)
     {
         // Parameter data is known.
         if (ParameterState == ParameterState.CountAndTypesKnown)
         {
             Applier.GetLambdaStatement();
         }
         else
         {
             ParseInfo.Script.Diagnostics.Error(ErrorMessage, Range);
         }
     }
     else
     {
         ParseInfo.ExpectingLambda.Apply(Applier);
     }
 }