From e2e0ed950bb147ebca3b9ac879268feeb185e20b Mon Sep 17 00:00:00 2001 From: Carlos Maniero Date: Wed, 3 May 2023 23:17:50 -0300 Subject: parser: Introduce statement keywords This commit introduces a few changes in pipalang syntax. Now, both functions and variables requires keywords to be defined. before: main(): i32 { a: i32 = 2; return a; } now: fn main(): i32 { let a: i32 = 2; return a; } Signed-off-by: Carlos Maniero Reviewed-by: Johnny Richard --- examples/arithmetics.pipa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/arithmetics.pipa') diff --git a/examples/arithmetics.pipa b/examples/arithmetics.pipa index e2b7645..f2449b8 100644 --- a/examples/arithmetics.pipa +++ b/examples/arithmetics.pipa @@ -1,3 +1,3 @@ -main(): i32 { +fn main(): i32 { return ((2 + 1) * (5 - 3) + 7) * 2 / 2; } -- cgit v1.2.3