Lines Matching refs:op

306             RewriteOperation op = new InsertBeforeOp( this, index, text );
308 op.instructionIndex = rewrites.Count;
309 rewrites.Add( op );
338 RewriteOperation op = new ReplaceOp( this, from, to, text );
340 op.instructionIndex = rewrites.Count;
341 rewrites.Add( op );
477 RewriteOperation op;
478 bool exists = indexToOp.TryGetValue( i, out op );
486 if ( !exists || op == null )
496 i = op.Execute( buf ); // execute operation and skip
507 foreach ( RewriteOperation op in indexToOp.Values )
509 if ( op.index >= _tokens.Count - 1 )
510 buf.Append( op.text );
538 * I.i.u = insert u before op @ index i
541 * First we need to examine replaces. For any replace op:
543 * 1. wipe out any insertions before op within that range.
544 * 2. Drop any replace op before that is contained completely within
555 * Don't actually delete; make op null in list. Easier to walk list.
556 * Later we can throw as we add to index -> op map.
572 RewriteOperation op = rewrites[i];
573 if ( op == null )
575 if ( !( op is ReplaceOp ) )
592 // delete insert as it's a no-op.
603 // delete replace as it's a no-op.
624 throw new ArgumentException( "replace op boundaries of " + rop +
633 RewriteOperation op = (RewriteOperation)rewrites[i];
634 if ( op == null )
636 if ( !( op is InsertBeforeOp ) )
666 throw new ArgumentException( "insert op " + iop +
675 RewriteOperation op = (RewriteOperation)rewrites[i];
676 if ( op == null )
680 if ( m.TryGetValue( op.index, out existing ) && existing != null )
682 throw new Exception( "should only be one op per index" );
684 m[op.index] = op;
686 //System.out.println("index to op: "+m);
705 RewriteOperation op = rewrites[i];
706 if ( op == null )
708 if ( op.GetType() == kind )
709 ops.Add( op );