From 442eba08dba74c3254a8d089ca1961147e59972b Mon Sep 17 00:00:00 2001 From: Flavian Kaufmann Date: Wed, 21 May 2025 09:31:49 +0200 Subject: syntactic sugar --- example/example.imp | 16 +++++++++++----- example/example2.imp | 7 +++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 example/example2.imp (limited to 'example') diff --git a/example/example.imp b/example/example.imp index 9db6655..b52d2da 100644 --- a/example/example.imp +++ b/example/example.imp @@ -1,7 +1,13 @@ -(y := 0; +y := 0; + var x := 5 in - (while x < 10 do - x := (x + 1) + + while x < 10 and true do + x := (x + 1); end; - y := x) -end) \ No newline at end of file + + y := x; + +end; + +z := 5; \ No newline at end of file diff --git a/example/example2.imp b/example/example2.imp new file mode 100644 index 0000000..9db6655 --- /dev/null +++ b/example/example2.imp @@ -0,0 +1,7 @@ +(y := 0; +var x := 5 in + (while x < 10 do + x := (x + 1) + end; + y := x) +end) \ No newline at end of file -- cgit v1.2.3