當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。