not working
This commit is contained in:
@@ -15,7 +15,7 @@ public static class Parser
|
||||
private static IEnumerable<Token> _tokens = [];
|
||||
private static int _index;
|
||||
|
||||
public static CompilationUnit? ParseFile(IEnumerable<Token> tokens, out IEnumerable<Diagnostic> diagnostics)
|
||||
public static SyntaxTree? ParseFile(IEnumerable<Token> tokens, string filePath, out IEnumerable<Diagnostic> diagnostics)
|
||||
{
|
||||
_tokens = tokens;
|
||||
_namespace = null!;
|
||||
@@ -46,7 +46,7 @@ public static class Parser
|
||||
}
|
||||
|
||||
diagnostics = _diagnostics;
|
||||
return new CompilationUnit(_namespace, definitions);
|
||||
return new SyntaxTree(filePath, _namespace, definitions);
|
||||
}
|
||||
catch (ParseException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user