aboutsummaryrefslogtreecommitdiffstats
path: root/core/init.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-03-21 19:06:18 +0000
committers-ol <s-ol@users.noreply.github.com>2020-03-21 19:06:18 +0000
commite83df1af2cdad8c2d61ba790a96875cd260eceaf (patch)
tree5766654329675bd5259be772bc2537c7fdd8ab1c /core/init.moon
parentdocs/guide: document supported interpreter versions (diff)
downloadalive-e83df1af2cdad8c2d61ba790a96875cd260eceaf.tar.gz
alive-e83df1af2cdad8c2d61ba790a96875cd260eceaf.zip
new meta/doc system
Diffstat (limited to 'core/init.moon')
-rw-r--r--core/init.moon5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/init.moon b/core/init.moon
index 00e3cd4..1aa0d2d 100644
--- a/core/init.moon
+++ b/core/init.moon
@@ -49,7 +49,10 @@ globals = Scope.from_table require 'core.builtin'
:Registry, :SimpleRegistry, :Tag
:globals
- parse: program\match
+
+ parse: (str) ->
+ assert (program\match str), Error 'syntax', "failed to parse"
+
eval: (str, inject) ->
scope = Scope nil, globals
scope\use inject if inject