nightshade

The nightshade programming language, compiler and tools (WIP)
Log | Files | Refs | README

commit 70cc1bd921cda6e181d9de57fc2815bb9f45dc6c
parent 6f9f0df8486c6737f4485db5b936afac92e4a0f1
Author: citbl <citbl@citbl.org>
Date:   Thu, 25 Jun 2026 16:24:21 +1000

minor format

Diffstat:
Msrc/ast_lower.adb | 12++++++------
Msrc/gen.adb | 6+++---
Msrc/types.ads | 2+-
3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/ast_lower.adb b/src/ast_lower.adb @@ -25,20 +25,20 @@ package body AST_Lower is return Lowerer'(File_Name => File_Name, Source => Source, AST => AST, Module => null, Pos => 0); end Init; - function Lower_Expr(LL : in out Lowerer; Expr : Expr) return IR_Value is + function Lower_Expr (LL : in out Lowerer; Expr : Expr) return IR_Value is begin LL.Pos := LL.Pos + 1; return IR_Value'(Id => LL.Pos, Typ => IR_Void); end; - - function Lower_Call(LL : in out Lowerer; Call : Call_Expr) return IR_Instruction is + + function Lower_Call (LL : in out Lowerer; Call : Call_Expr) return IR_Instruction is C : IR_Instruction; begin - Fields := Lower_Arguments(LL, Call.Params); + Fields := Lower_Arguments (LL, Call.Params); C := IR_Instruction'(Kind => CALL, Call_Name => Call.Name, Call_Has_Dest => false, Call_Args => Fields); end; - function Lower_Function (LL : in out Lowerer; Func : Func_Decl) return IR_Function is + function Lower_Function (LL : in out Lowerer; Func : Func_Decl) return IR_Function is F : IR_Function; T : IR_Type; begin @@ -51,7 +51,7 @@ package body AST_Lower is for SS : Stmt of Func.Stmts loop if SS.Kind = Stmt_Call_Kind then - Lower_Call(LL, SS.Call); + Lower_Call (LL, SS.Call); end if; end loop; diff --git a/src/gen.adb b/src/gen.adb @@ -27,7 +27,7 @@ package body Gen is procedure Put_Indent (GG : in out Generator) is begin - GG.Output := GG.Output & To_Unbounded_String(GG.Indent * ' '); + GG.Output := GG.Output & To_Unbounded_String (GG.Indent * ' '); end; -------------- @@ -45,7 +45,7 @@ package body Gen is Content : Unbounded_String := Param.Lit_Str; begin GG.Globals := GG.GLobals & "data $str = { b " & (Content) & ", b 0 }" & ASCII.LF; - Put_Indent(GG); + Put_Indent (GG); GG.Output := GG.Output & "%r =w call $puts(l $str)" & ASCII.LF; end; end; @@ -67,7 +67,7 @@ package body Gen is end if; end loop; - Put_Indent(GG); + Put_Indent (GG); GG.Output := GG.Output & "ret 0" & ASCII.LF; Gen_Unindent (GG); diff --git a/src/types.ads b/src/types.ads @@ -99,7 +99,7 @@ package Types is Call : Call_Expr; when String_Literal => - Lit_Str : Unbounded_String; + Lit_Str : Unbounded_String; File_Name : File_Name_Ref; Line : Positive; Col : Positive;