当前位置: 首页>>代码示例>>C#>>正文


C# Assignment.Accept方法代码示例

本文整理汇总了C#中Assignment.Accept方法的典型用法代码示例。如果您正苦于以下问题:C# Assignment.Accept方法的具体用法?C# Assignment.Accept怎么用?C# Assignment.Accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Assignment的用法示例。


在下文中一共展示了Assignment.Accept方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EqbSimpleEquivalence

		public void EqbSimpleEquivalence()
		{
			TypeFactory factory = new TypeFactory();
			TypeStore store = new TypeStore();
			EquivalenceClassBuilder eqb = new EquivalenceClassBuilder(factory, store);
			Identifier id1 = new Identifier("id2", PrimitiveType.Word32, null);
			Identifier id2 = new Identifier("id2", PrimitiveType.Word32, null);
			Assignment ass = new Assignment(id1, id2);
			ass.Accept(eqb);

			Assert.IsNotNull(id1);
			Assert.IsNotNull(id2);
			Assert.AreEqual(2, id1.TypeVariable.Number, "id1 type number");
			Assert.AreEqual(2, id1.TypeVariable.Number, "id2 type number");
			Assert.AreEqual(id1.TypeVariable.Class, id2.TypeVariable.Class);
		}
开发者ID:relaxar,项目名称:reko,代码行数:16,代码来源:EquivalenceClassBuilderTests.cs

示例2: DtbSameMemFetch

        public void DtbSameMemFetch()
        {
            Identifier foo = new Identifier("foo", PrimitiveType.Word32, null);
            Identifier bar = new Identifier("bar", PrimitiveType.Word16, null);
            Identifier baz = new Identifier("baz", PrimitiveType.Word16, null);
            Assignment ass1 = new Assignment(bar, MemLoad(foo, 4, PrimitiveType.Word16));
            Assignment ass2 = new Assignment(baz, MemLoad(foo, 4, PrimitiveType.Word16));
            ass1.Accept(eqb);
            ass2.Accept(eqb);
            TraitCollector trco = new TraitCollector(factory, store, dtb, prog);
            trco.VisitAssignment(ass1);
            trco.VisitAssignment(ass2);
            dtb.BuildEquivalenceClassDataTypes();

            Verify("Typing/DtbSameMemFetch.txt");
        }
开发者ID:killbug2004,项目名称:reko,代码行数:16,代码来源:DataTypeBuilderTests.cs

示例3: DtbRepeatedLoads

        public void DtbRepeatedLoads()
        {
            Identifier pfoo = new Identifier("pfoo", PrimitiveType.Word32, null);
            Identifier x = new Identifier("x", PrimitiveType.Word32, null);
            Assignment ass1 = new Assignment(x, MemLoad(pfoo, 4, PrimitiveType.Word32));
            Assignment ass2 = new Assignment(x, MemLoad(pfoo, 4, PrimitiveType.Word32));
            ass1.Accept(eqb);
            ass2.Accept(eqb);
            TraitCollector trco = new TraitCollector(factory, store, dtb, prog);
            trco.VisitAssignment(ass1);
            trco.VisitAssignment(ass2);
            dtb.BuildEquivalenceClassDataTypes();

            Verify("Typing/DtbRepeatedLoads.txt");
        }
开发者ID:killbug2004,项目名称:reko,代码行数:15,代码来源:DataTypeBuilderTests.cs


注:本文中的Assignment.Accept方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。