remove read only stuff
This commit is contained in:
@@ -8,19 +8,19 @@ namespace NubLang.Parsing;
|
||||
public sealed class Parser
|
||||
{
|
||||
private readonly List<Diagnostic> _diagnostics = [];
|
||||
private IReadOnlyList<Token> _tokens = [];
|
||||
private List<Token> _tokens = [];
|
||||
private int _tokenIndex;
|
||||
private string _moduleName = string.Empty;
|
||||
|
||||
private Token? CurrentToken => _tokenIndex < _tokens.Count ? _tokens[_tokenIndex] : null;
|
||||
private bool HasToken => CurrentToken != null;
|
||||
|
||||
public IReadOnlyList<Diagnostic> GetDiagnostics()
|
||||
public List<Diagnostic> GetDiagnostics()
|
||||
{
|
||||
return _diagnostics;
|
||||
}
|
||||
|
||||
public SyntaxTree Parse(IReadOnlyList<Token> tokens)
|
||||
public SyntaxTree Parse(List<Token> tokens)
|
||||
{
|
||||
_diagnostics.Clear();
|
||||
_tokens = tokens;
|
||||
|
||||
Reference in New Issue
Block a user