예제 #1
0
        public override Func <Context, IBinding> VisitTybinder_type([NotNull] FullSimpleParser.Tybinder_typeContext context)
        {
            if (context.type() != null)
            {
                var type = _typeVisitor.Visit(context.type());

                return(ctx => new TypeAbbBind(type(ctx)));
            }

            return(_ => new TypeVarBind());
        }
예제 #2
0
        public override Func <Context, ITerm> VisitTerm_llcid([NotNull] FullSimpleParser.Term_llcidContext context)
        {
            var v    = context.LCID().GetText();
            var info = context.GetFileInfo();
            var type = _typeVisitor.Visit(context.type());
            var term = Visit(context.term());

            return(ctx =>
            {
                var ctx1 = ctx.AddName(v);
                return new Abs(info, v, type(ctx), term(ctx1));
            });
        }
예제 #3
0
        public override Func <Context, IBinding> VisitBinder_type([NotNull] FullSimpleParser.Binder_typeContext context)
        {
            var type = _typeVisitor.Visit(context.type());

            return(ctx => new VarBind(type(ctx)));
        }
예제 #4
0
 public override Func <Context, IType> VisitAt_type([NotNull] FullSimpleParser.At_typeContext context)
 {
     return(_typeVisitor.Visit(context.type()));
 }