This commit is contained in:
nub31
2025-11-03 12:52:17 +01:00
parent 40d500fddd
commit 085f7a1a6a
17 changed files with 368 additions and 190 deletions

View File

@@ -13,10 +13,10 @@ var generator = new LlvmGenerator();
foreach (var file in args)
{
tokenizer.Tokenize(file, File.ReadAllText(file));
var tokens = tokenizer.Tokenize(file, File.ReadAllText(file));
diagnostics.AddRange(tokenizer.Diagnostics);
var syntaxTree = parser.Parse(tokenizer.Tokens);
var syntaxTree = parser.Parse(tokens);
diagnostics.AddRange(parser.Diagnostics);
syntaxTrees.Add(syntaxTree);
@@ -69,7 +69,7 @@ for (var i = 0; i < args.Length; i++)
}
var path = Path.Combine(".build", Path.ChangeExtension(file, "ll"));
File.WriteAllText(path, generator.Emit(compilationUnit));
File.WriteAllText(path, generator.Emit(compilationUnit, moduleRepository));
}
return 0;