Skip to content

Commit

Permalink
Use pooled List<SyntaxToken> rather than allocating new one
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinCampbell committed Mar 18, 2024
1 parent 938b8c4 commit 214359a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -142,7 +142,7 @@ protected bool LookaheadUntil(Func<SyntaxToken, IEnumerable<SyntaxToken>, bool>

var matchFound = false;

var tokens = new List<SyntaxToken>();
using var _ = ListPool<SyntaxToken>.GetPooledObject(out var tokens);
tokens.Add(CurrentToken);

while (true)
Expand Down

0 comments on commit 214359a

Please sign in to comment.