summary refs log tree commit diff stats
path: root/tests/compilerapi/myscript.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compilerapi/myscript.nim')
-rw-r--r--tests/compilerapi/myscript.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/compilerapi/myscript.nim b/tests/compilerapi/myscript.nim
new file mode 100644
index 000000000..c5d9fe22a
--- /dev/null
+++ b/tests/compilerapi/myscript.nim
@@ -0,0 +1,14 @@
+
+import exposed
+
+type NumberHolder = object
+  ival: int
+  fval: float
+
+echo "top level statements are executed!"
+echo NumberHolder(ival: 10, fval: 2.0)
+
+proc hostProgramRunsThis*(a, b: float): float =
+  result = addFloats(a, b, 1.0)
+
+let hostProgramWantsThis* = "my secret"