This commit is contained in:
nub31
2025-10-22 17:45:53 +02:00
parent c48f7c6244
commit 8e37852df0
9 changed files with 201 additions and 86 deletions

View File

@@ -1,3 +1,4 @@
using System.Diagnostics;
using System.Text;
using NubLang.Ast;
using NubLang.Syntax;
@@ -255,6 +256,11 @@ public class Generator
private string EmitExpression(ExpressionNode expressionNode)
{
if (expressionNode is IntermediateExpression)
{
throw new UnreachableException("Type checker fucked up");
}
var expr = expressionNode switch
{
ArrayIndexAccessNode arrayIndexAccessNode => EmitArrayIndexAccess(arrayIndexAccessNode),