Exemplo n.º 1
0
 internal override bool Equals(Opcode op)
 {
     if (base.Equals(op))
     {
         StringPrefixOpcode opcode = (StringPrefixOpcode)op;
         return(opcode.literal == this.literal);
     }
     return(false);
 }
Exemplo n.º 2
0
        internal override void Add(Opcode op)
        {
            StringPrefixOpcode opcode = op as StringPrefixOpcode;

            if (opcode == null)
            {
                base.Add(op);
            }
            else
            {
                StringPrefixBranchOpcode with = new StringPrefixBranchOpcode();
                base.prev.Replace(this, with);
                with.Add(this);
                with.Add(opcode);
            }
        }
        internal override void Add(Opcode op)
        {
            StringPrefixOpcode prefixOp = op as StringPrefixOpcode;

            if (null == prefixOp)
            {
                base.Add(op);
                return;
            }

            Fx.Assert(null != this.prev, "");

            StringPrefixBranchOpcode branch = new StringPrefixBranchOpcode();

            this.prev.Replace(this, branch);
            branch.Add(this);
            branch.Add(prefixOp);
        }