From d169670b00c749e701192d87fee8844207240272 Mon Sep 17 00:00:00 2001 From: Natapat Samutpong Date: Sat, 12 Feb 2022 21:32:20 +0700 Subject: [PATCH] examples --- README.md | 8 ++++++++ example/{hello_world.hyc => ex.hyc} | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) rename example/{hello_world.hyc => ex.hyc} (96%) diff --git a/README.md b/README.md index f0651a4..2781401 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # Hycron Programming language +``` +func main :: () -> Int = { + let msg :: String = "Hello, World"; + puts(msg); + return 1; +}; +``` + # TODO - Compliation - Optimization diff --git a/example/hello_world.hyc b/example/ex.hyc similarity index 96% rename from example/hello_world.hyc rename to example/ex.hyc index a86a494..edcb1f1 100644 --- a/example/hello_world.hyc +++ b/example/ex.hyc @@ -14,4 +14,5 @@ func main :: () -> Int = { let n :: Bool = 2 == 2; // Prefix operator let m :: Bool = !n; -}; + puts(m); +}; \ No newline at end of file