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


C# CSharp.Statement类代码示例

本文整理汇总了C#中Mono.CSharp.Statement的典型用法代码示例。如果您正苦于以下问题:C# Statement类的具体用法?C# Statement怎么用?C# Statement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Statement类属于Mono.CSharp命名空间,在下文中一共展示了Statement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CloneTo

		protected override void CloneTo (CloneContext clonectx, Statement t)
		{
			Catch target = (Catch) t;

			if (type_expr != null)
				target.type_expr = (FullNamedExpression) type_expr.Clone (clonectx);

			target.block = clonectx.LookupBlock (block);
		}
开发者ID:alisci01,项目名称:mono,代码行数:9,代码来源:statement.cs

示例2: CloneTo

 protected override void CloneTo(CloneContext clonectx, Statement target)
 {
     throw new NotSupportedException ();
 }
开发者ID:speier,项目名称:shake,代码行数:4,代码来源:iterators.cs

示例3: Visit

			public override object Visit (Statement stmt)
			{
				Console.WriteLine ("unknown statement:" + stmt);
				return null;
			}
开发者ID:pgoron,项目名称:monodevelop,代码行数:5,代码来源:CSharpParser.cs

示例4: Add

		public void Add (Statement statement)
		{
			statements.Add (statement);
		}
开发者ID:alisci01,项目名称:mono,代码行数:4,代码来源:statement.cs

示例5: RewriteForDeclarators

			public Statement RewriteForDeclarators (BlockContext bc, Statement stmt)
			{
				for (int i = declarators.Count - 1; i >= 0; --i) {
					var d = declarators [i];
					var vd = new VariableDeclaration (d.Variable, type_expr.Location);
					vd.Initializer = d.Initializer;
					vd.IsNested = true;
					vd.dispose_call = CreateDisposeCall (bc, d.Variable);
					vd.dispose_call.Resolve (bc);

					stmt = new Using (vd, stmt, d.Variable.Location);
				}

				declarators = null;
				return stmt;
			}
开发者ID:alisci01,项目名称:mono,代码行数:16,代码来源:statement.cs

示例6: Using

		public Using (VariableDeclaration decl, Statement stmt, Location loc)
			: base (stmt, loc)
		{
			this.decl = decl;
		}
开发者ID:alisci01,项目名称:mono,代码行数:5,代码来源:statement.cs

示例7: ResolveInitializer

			protected override Expression ResolveInitializer (BlockContext bc, LocalVariable li, Expression initializer)
			{
				Assign assign;
				if (li.Type == InternalType.Dynamic) {
					initializer = initializer.Resolve (bc);
					if (initializer == null)
						return null;

					initializer = Convert.ImplicitConversionRequired (bc, initializer, TypeManager.idisposable_type, loc);
					if (initializer == null)
						return null;

					var var = LocalVariable.CreateCompilerGenerated (TypeManager.idisposable_type, bc.CurrentBlock, loc);
					assign = new SimpleAssign (var.CreateReferenceExpression (bc, loc), initializer, loc);
					assign.ResolveStatement (bc);

					dispose_call = CreateDisposeCall (bc, var);
					dispose_call.Resolve (bc);

					return assign;
				}

				if (li == Variable) {
					CheckIDiposableConversion (bc, li, initializer);
					dispose_call = CreateDisposeCall (bc, li);
					dispose_call.Resolve (bc);
				}

				return base.ResolveInitializer (bc, li, initializer);
			}
开发者ID:alisci01,项目名称:mono,代码行数:30,代码来源:statement.cs

示例8: TryFinally

		public TryFinally (Statement stmt, Block fini, Location loc)
			 : base (stmt, loc)
		{
			this.fini = fini;
		}
开发者ID:alisci01,项目名称:mono,代码行数:5,代码来源:statement.cs

示例9: For

		public For (Statement init_statement,
			    BooleanExpression test,
			    Statement increment,
			    Statement statement,
			    Location l)
		{
			InitStatement = init_statement;
			Test = test;
			Increment = increment;
			Statement = statement;
			loc = l;
		}
开发者ID:alisci01,项目名称:mono,代码行数:12,代码来源:statement.cs

示例10: StatementList

		public StatementList (Statement first, Statement second)
		{
			statements = new List<Statement> () { first, second };
		}
开发者ID:alisci01,项目名称:mono,代码行数:4,代码来源:statement.cs

示例11: ArrayForeach

			public ArrayForeach (Foreach @foreach, int rank)
			{
				for_each = @foreach;
				statement = for_each.statement;
				loc = @foreach.loc;
				variable = new LocalVariableReference (for_each.variable, loc);

				counter = new StatementExpression[rank];
				variables = new TemporaryVariableReference[rank];
				length_exprs = new Expression [rank];

				//
				// Only use temporary length variables when dealing with
				// multi-dimensional arrays
				//
				if (rank > 1)
					lengths = new TemporaryVariableReference [rank];
			}
开发者ID:alisci01,项目名称:mono,代码行数:18,代码来源:statement.cs

示例12: Body

				public Body (TypeSpec type, LocalVariable variable,
								   Expression current, Statement statement,
								   Location loc)
				{
					this.type = type;
					this.variable = new LocalVariableReference (variable, loc);
					this.current = current;
					this.statement = statement;
					this.loc = loc;
				}
开发者ID:alisci01,项目名称:mono,代码行数:10,代码来源:statement.cs

示例13: Foreach

		public Foreach (Expression type, LocalVariable var, Expression expr, Statement stmt, Location l)
		{
			this.type = type;
			this.variable = var;
			this.expr = expr;
			statement = stmt;
			loc = l;
		}
开发者ID:alisci01,项目名称:mono,代码行数:8,代码来源:statement.cs

示例14: DynamicEventCompoundAssign

        public DynamicEventCompoundAssign(string name, Arguments args, ExpressionStatement assignment, ExpressionStatement invoke, Location loc)
            : base(null, args, loc)
        {
            this.name = name;
            base.binder = this;

            // Used by += or -= only
            type = TypeManager.bool_type;

            condition = new If (
                new Binary (Binary.Operator.Equality, this, new BoolLiteral (true, loc), loc),
                new StatementExpression (invoke), new StatementExpression (assignment),
                loc);
        }
开发者ID:speier,项目名称:shake,代码行数:14,代码来源:dynamic.cs

示例15: CloneTo

			protected override void CloneTo (CloneContext clonectx, Statement target)
			{
				// Nothing to clone
			}
开发者ID:rabink,项目名称:mono,代码行数:4,代码来源:anonymous.cs


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