public static void EnumChildren(ICompletionDataGenerator cdgen,ResolutionContext ctxt, IBlockNode block, bool isVarInstance,
			MemberFilter vis = MemberFilter.Methods | MemberFilter.Types | MemberFilter.Variables | MemberFilter.Enums)
		{
			var scan = new MemberCompletionEnumeration(ctxt, cdgen) { isVarInst = isVarInstance };

			scan.ScanBlock(block, CodeLocation.Empty, vis);
		}
		public static void EnumChildren(ICompletionDataGenerator cdgen,ResolutionContext ctxt, UserDefinedType udt, bool isVarInstance, 
			MemberFilter vis = MemberFilter.Methods | MemberFilter.Types | MemberFilter.Variables | MemberFilter.Enums)
		{
			var scan = new MemberCompletionEnumeration(ctxt, cdgen) { isVarInst = isVarInstance };

			scan.DeepScanClass(udt, vis);
		}
        public static void EnumChildren(ICompletionDataGenerator cdgen, ResolutionContext ctxt, IBlockNode block, bool isVarInstance,
                                        MemberFilter vis = MemberFilter.Methods | MemberFilter.Types | MemberFilter.Variables | MemberFilter.Enums)
        {
            var scan = new MemberCompletionEnumeration(ctxt, cdgen)
            {
                isVarInst = isVarInstance
            };

            scan.ScanBlock(block, CodeLocation.Empty, vis);
        }
        public static void EnumChildren(ICompletionDataGenerator cdgen, ResolutionContext ctxt, UserDefinedType udt, bool isVarInstance,
                                        MemberFilter vis = MemberFilter.Methods | MemberFilter.Types | MemberFilter.Variables | MemberFilter.Enums)
        {
            var scan = new MemberCompletionEnumeration(ctxt, cdgen)
            {
                isVarInst = isVarInstance
            };

            scan.DeepScanClass(udt, vis);
        }
		public static void EnumAllAvailableMembers(ICompletionDataGenerator cdgen, IBlockNode ScopedBlock
			, IStatement ScopedStatement,
			CodeLocation Caret,
		    ParseCacheView CodeCache,
			MemberFilter VisibleMembers,
			ConditionalCompilationFlags compilationEnvironment = null)
		{
			var ctxt = ResolutionContext.Create(CodeCache, compilationEnvironment, ScopedBlock, ScopedStatement);
			
			var en = new MemberCompletionEnumeration(ctxt, cdgen) {isVarInst = true};

			en.IterateThroughScopeLayers(Caret, VisibleMembers);
		}
        public static void EnumAllAvailableMembers(ICompletionDataGenerator cdgen, IBlockNode ScopedBlock
                                                   , IStatement ScopedStatement,
                                                   CodeLocation Caret,
                                                   ParseCacheView CodeCache,
                                                   MemberFilter VisibleMembers,
                                                   ConditionalCompilationFlags compilationEnvironment = null)
        {
            var ctxt = ResolutionContext.Create(CodeCache, compilationEnvironment, ScopedBlock, ScopedStatement);

            var en = new MemberCompletionEnumeration(ctxt, cdgen)
            {
                isVarInst = true
            };

            en.IterateThroughScopeLayers(Caret, VisibleMembers);
        }
        protected override void BuildCompletionDataInternal(IEditorData Editor, char enteredChar)
        {
            var visibleMembers = MemberFilter.All;

            if (!GetVisibleMemberFilter(Editor, enteredChar, ref visibleMembers, ref curStmt))
            {
                return;
            }

            MemberCompletionEnumeration.EnumAllAvailableMembers(
                CompletionDataGenerator,
                curBlock,
                curStmt,
                Editor.CaretLocation,
                Editor.ParseCache,
                visibleMembers,
                new ConditionalCompilationFlags(Editor));

            //TODO: Split the keywords into such that are allowed within block statements and non-block statements
            // Insert typable keywords
            if (visibleMembers.HasFlag(MemberFilter.Keywords))
            {
                foreach (var kv in DTokens.Keywords)
                {
                    CompletionDataGenerator.Add(kv.Key);
                }
            }

            else if (visibleMembers.HasFlag(MemberFilter.StructsAndUnions))
            {
                foreach (var kv in DTokens.BasicTypes_Array)
                {
                    CompletionDataGenerator.Add(kv);
                }
            }
        }
 void BuildCompletionData(UserDefinedType tr, bool showInstanceItems)
 {
     MemberCompletionEnumeration.EnumChildren(CompletionDataGenerator, ctxt, tr, showInstanceItems, MemberFilter);
     StaticProperties.ListProperties(CompletionDataGenerator, MemberFilter, tr, showInstanceItems);
 }