diff --git a/simple_loop_test.nyash b/simple_loop_test.nyash new file mode 100644 index 00000000..d77575d8 --- /dev/null +++ b/simple_loop_test.nyash @@ -0,0 +1,6 @@ +local i +i = 0 +loop(i < 3) { + print(i) + i = i + 1 +} \ No newline at end of file diff --git a/simple_loop_test2.nyash b/simple_loop_test2.nyash new file mode 100644 index 00000000..43dddf6b --- /dev/null +++ b/simple_loop_test2.nyash @@ -0,0 +1,3 @@ +loop(true) { + print("Loop iteration") +} \ No newline at end of file diff --git a/simple_loop_test3.nyash b/simple_loop_test3.nyash new file mode 100644 index 00000000..1b9c9130 --- /dev/null +++ b/simple_loop_test3.nyash @@ -0,0 +1,4 @@ +loop(false) { + print("This should not execute") +} +print("Loop completed") \ No newline at end of file diff --git a/simple_test.nyash b/simple_test.nyash new file mode 100644 index 00000000..553ba6b4 --- /dev/null +++ b/simple_test.nyash @@ -0,0 +1 @@ +print("Simple test") \ No newline at end of file diff --git a/simple_throw_test.nyash b/simple_throw_test.nyash new file mode 100644 index 00000000..c619de45 --- /dev/null +++ b/simple_throw_test.nyash @@ -0,0 +1,2 @@ +print("Testing throw") +throw "Simple exception" \ No newline at end of file diff --git a/simple_try_test.nyash b/simple_try_test.nyash new file mode 100644 index 00000000..e4db0600 --- /dev/null +++ b/simple_try_test.nyash @@ -0,0 +1,6 @@ +try { + print("In try block") + throw "Test exception" +} catch (Exception e) { + print("Caught exception") +} \ No newline at end of file