Skip to content

Commit

Permalink
sonar linting
Browse files Browse the repository at this point in the history
  • Loading branch information
b3b00 committed Apr 19, 2024
1 parent a5204f5 commit 279714f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sly/parser/syntax/grammar/Rule.cs
Expand Up @@ -157,7 +157,7 @@ public bool Match<OUT>(IList<Token<IN>> tokens, int position, ParserConfiguratio
{
var secondPossibleLeadings =
configuration.NonTerminals[nTerm.NonTerminalName].PossibleLeadingTokens;
if (secondPossibleLeadings.Any(x => x.Match(tokens[position+1])) || nTerm.MayBeEmpty())
if (secondPossibleLeadings.Exists(x => x.Match(tokens[position+1])) || nTerm.MayBeEmpty())
{
return true;
}
Expand All @@ -168,7 +168,7 @@ public bool Match<OUT>(IList<Token<IN>> tokens, int position, ParserConfiguratio
return false;
}

return PossibleLeadingTokens.Any(x => x.Match(tokens[position])) || MayBeEmpty;
return PossibleLeadingTokens.Exists(x => x.Match(tokens[position])) || MayBeEmpty;
}

public string Dump()
Expand Down

0 comments on commit 279714f

Please sign in to comment.