aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorc+12023-05-17 11:38:44 -0400
committerc+12023-05-17 11:38:44 -0400
commita8bfa841540a13aea75fafcf11fe27688f1ea939 (patch)
tree7b709f47f831f8bcad61dd5f9a73942adfc50463 /examples
parent6ada416e01aa358527b243236eae560399b7d84b (diff)
new sytax?
Diffstat (limited to 'examples')
-rw-r--r--examples/simple.halk1
-rw-r--r--examples/v2.halk16
2 files changed, 17 insertions, 0 deletions
diff --git a/examples/simple.halk b/examples/simple.halk
new file mode 100644
index 0000000..a46b51f
--- /dev/null
+++ b/examples/simple.halk
@@ -0,0 +1 @@
+let.variable -> "Hi";
diff --git a/examples/v2.halk b/examples/v2.halk
new file mode 100644
index 0000000..c116ed7
--- /dev/null
+++ b/examples/v2.halk
@@ -0,0 +1,16 @@
+` new syntax `
+
+#include."IO.halk"; ` preprocessor directives start with '#' and end with ';' `
+#macro."PI","3.14159"; ` replace every instance of PI with 3.14159 `
+
+
+` mut:?<some type>:<some name> = <some value>; `
+
+str:hello = "Hello"; ` by default, variables are immutable `
+mut:str:world = "world" ` one can create an immutable variable with mut: `
+
+void:say_hello.str:to = { ` functions need no special keyword `
+ io.stdout.to;
+}
+
+