1 write to _tokens
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
62
_tokens
= new SegmentedList<SyntaxToken>(sizeOfList);
26 references to _tokens
Microsoft.CodeAnalysis.CodeStyle (26)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (26)
63
_tokens
.AddRange(_treeData.GetApplicableTokens(spanToFormat));
83
var previousToken =
_tokens
[0];
84
for (var i = 1; i <
_tokens
.Count; i++)
86
var currentToken =
_tokens
[i];
122
return new TokenData(this, 0,
_tokens
[0]);
130
return new TokenData(this, this.TokenCount - 1,
_tokens
[this.TokenCount - 1]);
134
public int TokenCount =>
_tokens
.Count;
139
return
_tokens
[index];
152
return new TokenData(this, tokenData.IndexInStream - 1,
_tokens
[tokenData.IndexInStream - 1]);
158
if (
_tokens
[lastIndex].Equals(previousToken))
160
return new TokenData(this, lastIndex,
_tokens
[lastIndex]);
170
return new TokenData(this, tokenData.IndexInStream + 1,
_tokens
[tokenData.IndexInStream + 1]);
175
if (
_tokens
[0].Equals(nextToken))
177
return new TokenData(this, 0,
_tokens
[0]);
363
yield return ValueTuple.Create(ValueTuple.Create(
_tokens
[pairIndex],
_tokens
[pairIndex + 1]), trivia);
469
var info = _factory.Create(
_tokens
[pairIndex],
_tokens
[pairIndex + 1]);
503
var tokenIndex =
_tokens
.BinarySearch(token, TokenOrderComparer.Instance);
513
return
_tokens
[tokenIndex] == token ? tokenIndex : -1;
520
for (var i = tokenIndex; i <
_tokens
.Count; i++)
522
if (!
_tokens
[i].FullSpan.IsEmpty)
529
if (
_tokens
[i] == token)
537
if (!
_tokens
[i].FullSpan.IsEmpty)
544
if (
_tokens
[i] == token)
554
=> new(
_tokens
);