...
This commit is contained in:
@@ -11,14 +11,15 @@ public sealed class Parser
|
||||
private Token? CurrentToken => _tokenIndex < _tokens.Count ? _tokens[_tokenIndex] : null;
|
||||
private bool HasToken => CurrentToken != null;
|
||||
|
||||
public List<Diagnostic> Diagnostics { get; } = [];
|
||||
public List<Diagnostic> Diagnostics { get; set; } = [];
|
||||
|
||||
public SyntaxTree Parse(List<Token> tokens)
|
||||
{
|
||||
Diagnostics.Clear();
|
||||
_tokens = tokens;
|
||||
_tokenIndex = 0;
|
||||
|
||||
Diagnostics = [];
|
||||
|
||||
var topLevelSyntaxNodes = new List<TopLevelSyntaxNode>();
|
||||
|
||||
while (HasToken)
|
||||
|
||||
Reference in New Issue
Block a user