internal bool LookupSubspaceBySignature(BooleanPattern signature, out GMacFrameSubspace outSymbol) { outSymbol = FrameSubspaces.FirstOrDefault(x => x.SubspaceSignaturePattern == signature); return(ReferenceEquals(outSymbol, null) == false); }
private bool TryAddAsFrameSubspace(string symbolName, LanguageSymbol langSymbol) { var symbol = langSymbol as GMacFrameSubspace; if (symbol == null) { return(false); } FrameSubspaces.Add(symbolName, symbol); return(true); }
/// <summary> /// Search for a child subspace in this frame having the given signature. /// If a subspace is found return its signature alse return the given input signature /// </summary> /// <param name="signature"></param> /// <param name="outSignature"></param> /// <returns></returns> private bool LookupSubspaceSignaturePattern(BooleanPattern signature, out BooleanPattern outSignature) { var outSymbol = FrameSubspaces.FirstOrDefault(x => x.SubspaceSignaturePattern == signature); if (ReferenceEquals(outSymbol, null)) { outSignature = signature; return(false); } outSignature = outSymbol.SubspaceSignaturePattern; return(true); }