aboutsummaryrefslogtreecommitdiffstats
path: root/core/value.moon
diff options
context:
space:
mode:
Diffstat (limited to 'core/value.moon')
-rw-r--r--core/value.moon2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/value.moon b/core/value.moon
index 6fbda65..5379921 100644
--- a/core/value.moon
+++ b/core/value.moon
@@ -37,6 +37,8 @@ class Result
for d in *@op.impulses
@all_impulses[d] = true
+ is_const: => not next @all_impulses
+
-- asserts value-constness and returns the value
const: (msg) =>
assert not (next @all_impulses), msg or "eval-time const expected"