private void AddElementToMember(SyntaxTree sourceAST, ref IMember parentMember, IMember newElement) { if (parentMember == null) { sourceAST.AddMember(newElement); } else { parentMember.AddScope(newElement); } parentMember = newElement; }
private bool TryReadModuleProcedure(ref IMember parentMember) { if (IsMemberExpected <ProcedureReference>(parentMember)) { if (TryReadElementString("module procedure", true)) { var name = streamReader.ReadElementName(); parentMember.AddScope(new ProcedureReference { Name = name }); return(true); } } return(false); }