コード例 #1
0
        public new static TCall LeftClaim(StringClaimer claimer, TExpression left)
        {
            Claim lb = claimer.Claim(LeftBracket);

            if (!lb.Success) // Left Bracket is a requirement.
            {
                return(null);
            }
            lb.Pass(); // At this point, we cannot fail.

            TCall newCall = new TCall {
                _caller = left
            };

            while (true)
            {
                Claim rb = claimer.Claim(RightBracket);
                if (rb.Success)
                {
                    rb.Pass();
                    break;
                }
                TArgument newArg = TArgument.Claim(claimer);
                if (newArg == null)
                {
                    break;
                }
                newCall._arguments.Add(newArg);
                claimer.Claim(Comma);
            }

            return(newCall);
        }
コード例 #2
0
 private static TExpression post_claim(StringClaimer claimer, TExpression lastClaim)
 {
     return(TCall.LeftClaim(claimer, lastClaim) ??
            TArithmetic.LeftClaim(claimer, lastClaim));
 }