public bool FindIdentifier(string name, IdentifierType type, out IdentifierSearchResult res) { res = new Assemble.IdentifierSearchResult(); switch (this.Type) { case enumStatementType.Instruction: { if (Instruction.FindIdentifier(name, type, out res)) { return(true); } } break; case enumStatementType.Block: { //Don't search sub block's contents if (Block.FindIdentifierOfThis(name, type, out res)) { return(true); } } break; } return(false); }
public bool FindIdentifier(string name, IdentifierType type, out IdentifierSearchResult res) { res = new Assemble.IdentifierSearchResult(); if (type.HasFlag(IdentifierType.ReferencingAddress) && this.Name == name) { res.Type = IdentifierType.ReferencingAddress; res.AddressIdentifier = this.PlacedInfo; return(true); } return(false); }
public bool FindIdentifier(string name, IdentifierType type, out IdentifierSearchResult res) { res = new Assemble.IdentifierSearchResult(); foreach (var sect in Sections) { if (sect.FindIdentifier(name, type, out res, false)) //Do not re-search this root code { return(true); } } return(false); }
public bool FindIdentifier(string name, IdentifierType type, out IdentifierSearchResult res) { res = new Assemble.IdentifierSearchResult(); //Labels foreach (var lbl in Labels) { if (lbl.FindIdentifier(name, type, out res)) { return(true); } } return(false); }
public bool FindIdentifierOfThis(string name, IdentifierType type, out IdentifierSearchResult res) { res = new Assemble.IdentifierSearchResult(); if (type.HasFlag(IdentifierType.ReferencingAddress) && this.Name == name) { res.Type = IdentifierType.ReferencingAddress; res.AddressIdentifier = this.PlacedInfo; return(true); } foreach (var lbl in this.Labels) { if (lbl.FindIdentifier(name, type, out res)) { return(true); } } return(false); }
/// <summary> /// この命令の中に指定された識別子によって参照されるものがあるか検索します /// </summary> public bool FindIdentifier(string name, IdentifierType type, out IdentifierSearchResult res) { res = new Assemble.IdentifierSearchResult(); //Operands foreach (var opr in Operands) { if (opr.FindIdentifier(name, type, out res)) { return(true); } } //Labels for (int lblIdx = 0; lblIdx < Labels.Count; lblIdx++) { if (Labels[lblIdx].FindIdentifier(name, type, out res)) { return(true); } } return(false); }