Exemple #1
0
        public void Match()
        {
            var type1 = new BaseType();
            var type2 = new BaseType();

            Assert.IsTrue(type1.Match(type1));
            Assert.IsFalse(type1.Match(null));
            Assert.IsFalse(type1.Match(type2));
        }
Exemple #2
0
        public Machine()
        {
            this.typeContext.SetValue("Integer", IntegerType.Instance);
            this.typeContext.SetValue("Double", DoubleType.Instance);

            var tbool = new BaseType();

            this.typeContext.SetValue("Boolean", tbool);
            this.expressionContext.SetValue("False", new ValueExpression(tbool));
            this.expressionContext.SetValue("True", new ValueExpression(tbool));
        }