/// <summary> /// Call this method instead of adding the items directly in the list, /// updates the scope and file name /// </summary> private void AddParsedItem(ParsedItem item, ushort ownerNumber) { // add external flag + include line if needed if (ownerNumber > 0 && ownerNumber < _parsedIncludes.Count) { item.FilePath = _parsedIncludes[ownerNumber].FullFilePath; item.IncludeLine = _parsedIncludes[ownerNumber].Line; item.Flags |= ParseFlag.FromInclude; } else { item.FilePath = _filePathBeingParsed; } item.Scope = _context.Scope; // add the item name's to the known temp tables? if (!_knownWords.ContainsKey(item.Name) && item is ParsedTable) { _knownWords.Add(item.Name, CompletionType.Table); } _parsedItemList.Add(item); }
/// <summary> /// Call this method instead of adding the items directly in the list, /// updates the scope and file name /// </summary> private void AddParsedItem(ParsedItem item) { item.FilePath = _filePathBeingParsed; item.Scope = _context.Scope; // add the item name's to the known words if (!_knownWords.ContainsKey(item.Name)) { _knownWords.Add(item.Name, (item is ParsedTable) ? CompletionType.Table : CompletionType.Keyword); } _parsedItemList.Add(item); }