Esempio n. 1
0
        private RelConstr MkNoConstr(Span span, bool hasBinding)
        {
            Contract.Requires(hasBinding ? argStack.Count > 1 : argStack.Count > 0);
            var  compr = new Compr(span);
            var  body  = new Body(span);
            Node arg;
            Id   binding;

            if (hasBinding)
            {
                arg     = argStack.Pop();
                binding = (Id)argStack.Pop();
            }
            else
            {
                binding = null;
                arg     = argStack.Pop();
            }

            body.AddConstr(new Find(span, binding, arg));
            compr.AddBody(body);
            compr.AddHead(new Id(span, ASTQueries.ASTSchema.Instance.ConstNameTrue));
            return(new RelConstr(span, RelKind.No, compr));
        }