internal void MapParsedNode(MappedNode node) { if (node.Type == MappedNodeType.TypeDefiniton) types.Add((MappedTypeDefinition)node); MapNode(RecordingStage.Parsed, node); }
private void TokensForNode(MappedNode node, Action<MappedToken> action) { var startIndex = IndexOfBufferPoint(node.TextSpan.iStartLine, node.TextSpan.iStartIndex); var endIndex = IndexOfBufferPoint(node.TextSpan.iEndLine, node.TextSpan.iEndIndex); for (var i = Lookup(startIndex); i < tokenMap.Count && tokenMap[i].Index + tokenMap[i].Length <= endIndex; i++) action(tokenMap[i]); }
internal void MapNode(RecordingStage stage, MappedNode node) { TokensForNode(node, token => node.Record(stage, token)); }