...
This commit is contained in:
@@ -9,12 +9,12 @@ namespace NubLang.Syntax.Parsing;
|
||||
public sealed class Parser
|
||||
{
|
||||
private string _namespace;
|
||||
private readonly IEnumerable<Token> _tokens;
|
||||
private readonly IReadOnlyList<Token> _tokens;
|
||||
|
||||
private readonly List<Diagnostic> _diagnostics = [];
|
||||
private int _tokenIndex;
|
||||
|
||||
public Parser(IEnumerable<Token> tokens)
|
||||
public Parser(IReadOnlyList<Token> tokens)
|
||||
{
|
||||
_namespace = "default";
|
||||
_tokens = tokens;
|
||||
@@ -815,9 +815,9 @@ public sealed class Parser
|
||||
_tokenIndex++;
|
||||
}
|
||||
|
||||
private IEnumerable<Token> GetTokens(int startIndex)
|
||||
private List<Token> GetTokens(int startIndex)
|
||||
{
|
||||
return _tokens.Skip(startIndex).Take(Math.Min(_tokenIndex, _tokens.Count() - 1) - startIndex);
|
||||
return _tokens.Skip(startIndex).Take(Math.Min(_tokenIndex, _tokens.Count() - 1) - startIndex).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user