コード例 #1
0
ファイル: Emitter.cs プロジェクト: kthompson/csharpos
 public void EmitExpressionStatement(ExpressionStatement node, int si)
 {
     EmitExpression(node.Expression, si);
 }
コード例 #2
0
		public override void VisitExpressionStatement (ExpressionStatement node)
		{
			Visit (node.Expression);
			WriteToken (";");
			WriteLine ();
		}
コード例 #3
0
			static bool TryGetAssignedVariable (ExpressionStatement node, out VariableReference variable)
			{
				variable = null;

				var assign = node.Expression as AssignExpression;
				if (assign == null)
					return false;

				var variable_reference = assign.Target as VariableReferenceExpression;
				if (variable_reference == null)
					return false;

				variable = variable_reference.Variable;
				return true;
			}
コード例 #4
0
			public override void VisitExpressionStatement (ExpressionStatement node)
			{
				switch (state) {
				case State.Begin:
					if (!TryGetAssignedVariable (node, out variable))
						break;

					initializer = node;
					state = State.Initializer;
					return;
				case State.Condition:
					VariableReference candidate;
					if (!TryGetAssignedVariable (node, out candidate))
						break;

					if (variable != candidate)
						break;

					state = State.Increment;
					increment = node;
					Match = true;
					break;
				}

				Continue = false;
			}
コード例 #5
0
ファイル: BaseCodeVisitor.cs プロジェクト: chkn/cecil
		public virtual void VisitExpressionStatement (ExpressionStatement node)
		{
			Visit (node.Expression);
		}