public override void visit(yield_sequence_node yn)
 {
     var id = NewVarName();
     id.source_context = yn.source_context;
     var fe = new foreach_stmt(id, new no_type_foreach(), yn.ex, new yield_node(id,yn.source_context),yn.source_context);
     ReplaceStatement(yn, fe);
 }
        public override void visit(yield_sequence_node yn)
        {
            var VarIdent = this.NewVarName();
            VarIdent.source_context = yn.ex.source_context;

            var_statement vs;
            if (yn.ex is nil_const)
                vs = new var_statement(VarIdent, new named_type_reference("System.Object"), yn.ex); // bug fix #246
            else
                vs = new var_statement(VarIdent, yn.ex);


            //var_statement VS = new var_statement(VarIdent, yn.ex) { source_context = yn.ex.source_context };
            ReplaceStatement(yn, SeqStatements(vs, new yield_sequence_node(VarIdent, yn.ex.source_context)));
        }
예제 #3
0
		public void write_yield_sequence_node(yield_sequence_node _yield_sequence_node)
		{
			write_statement(_yield_sequence_node);
			if (_yield_sequence_node.ex == null)
			{
				bw.Write((byte)0);
			}
			else
			{
				bw.Write((byte)1);
				_yield_sequence_node.ex.visit(this);
			}
		}
예제 #4
0
		public void visit(yield_sequence_node _yield_sequence_node)
		{
			bw.Write((Int16)215);
			write_yield_sequence_node(_yield_sequence_node);
		}
예제 #5
0
 public override void visit(yield_sequence_node yn)
 {
     sb.Append("yield sequence ");
     visit_node(yn.ex);
 }
 public override void visit(yield_sequence_node yn)
 {
     visit_yield_helper(yn);
     base.visit(yn);
 }
예제 #7
0
		public void read_yield_sequence_node(yield_sequence_node _yield_sequence_node)
		{
			read_statement(_yield_sequence_node);
			_yield_sequence_node.ex = _read_node() as expression;
		}
예제 #8
0
		public void visit(yield_sequence_node _yield_sequence_node)
		{
			read_yield_sequence_node(_yield_sequence_node);
		}