Skip to content

Commit

Permalink
fix: dum dum mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
R-unic committed Jan 26, 2025
1 parent a49c1e0 commit 5a6688f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Heir/Syntax/TokenStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public TokenStream WithoutTriviaExceptSemicolons() =>
public bool Match(SyntaxKind kind, [MaybeNullWhen(false)] out Token matchedToken)
{
var isMatch = Check(kind);
matchedToken = null;
if (isMatch)
matchedToken = Advance();

matchedToken = null;
return isMatch;
}

/// <returns>Whether the following sequence of tokens, starting at <see cref="startOffset"/>, matches the given <see cref="SortedSet{T}"/> of tokens in order</returns>
public bool CheckSequential(SortedSet<SyntaxKind> kinds, int startOffset = 0)
/// <returns>Whether the following sequence of tokens, starting at <see cref="startOffset"/>, matches the given <see cref="HashSet{T}"/> of tokens in order</returns>
public bool CheckSequential(HashSet<SyntaxKind> kinds, int startOffset = 0)
{
var offset = startOffset;
return kinds.All(kind => Check(kind, offset++));
Expand Down

0 comments on commit 5a6688f

Please sign in to comment.