diff --git a/examples/divert-target-for-loop/main.hank b/examples/divert-target-for-loop/main.hank new file mode 100644 index 0000000..8ce073a --- /dev/null +++ b/examples/divert-target-for-loop/main.hank @@ -0,0 +1,21 @@ +``` +var targets = [->knot1, ->knot2, ->knot3]; +for (target in targets) { + trace(target); + , -> @target -> +} +``` + +The end. + +== knot0 +Non-loop example. + +== knot1 +1 + +== knot2 +2 + +== knot3 +3 \ No newline at end of file diff --git a/examples/divert-target-for-loop/test1.hlog b/examples/divert-target-for-loop/test1.hlog new file mode 100644 index 0000000..1b979a5 --- /dev/null +++ b/examples/divert-target-for-loop/test1.hlog @@ -0,0 +1,4 @@ +1 +2 +3 +The end. \ No newline at end of file diff --git a/examples/local-variables/main.hank b/examples/local-variables/main.hank new file mode 100644 index 0000000..6303aa0 --- /dev/null +++ b/examples/local-variables/main.hank @@ -0,0 +1,21 @@ +``` +var local = "1"; +, {local} + +local = "2"; +var local2 = "3"; + +,,, +{local} +{local2} +,,, + +local = ->the_end; + +, ->the_end + +``` + +== the_end + +The end. \ No newline at end of file diff --git a/examples/local-variables/test1.hlog b/examples/local-variables/test1.hlog new file mode 100644 index 0000000..1b979a5 --- /dev/null +++ b/examples/local-variables/test1.hlog @@ -0,0 +1,4 @@ +1 +2 +3 +The end. \ No newline at end of file