Beispiel #1
0
 public virtual ICodeNode VisitConditionCase(ConditionCase node)
 {
     node.Condition = (Expression)Visit(node.Condition);
     return(node);
 }
		public override void VisitConditionCase (ConditionCase node)
		{
			WriteKeyword ("case");
			WriteSpace ();
			Visit (node.Condition);
			WriteToken (":");
			WriteLine ();

			Visit (node.Body);
		}
Beispiel #3
0
		public virtual void VisitConditionCase (ConditionCase node)
		{
			Visit (node.Condition);
		}
Beispiel #4
0
		public override void OnSwitch (Instruction instruction)
		{
			//AddOptimizedSwitch (instruction);
			
			var @switch = new SwitchStatement (Pop ());

			var targets = (Instruction []) instruction.Operand;

			for (int i = 0; i < targets.Length; i++) {
				var target = targets [i];

				var body = new BlockStatement ();

				var condition = new ConditionCase (new LiteralExpression (i), body);

				body.Statements.Add (
					new GotoStatement (GetLabelName (target)));

				@switch.Cases.Add (condition);
			}

			Add (@switch);
		}
 public virtual void VisitConditionCase(ConditionCase node)
 {
     Visit(node.Condition);
 }