aboutsummaryrefslogtreecommitdiff
path: root/lib/secrets.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-10-02 17:21:22 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-10-02 17:21:22 -0700
commitdcd3391b36c7accc194cfdc8654db085c9bc820e (patch)
treed55e932ed8b4ba17dd5729803e27c1a543fb672a /lib/secrets.nom
parente2bbbfe1611f12b33692af175d661fa25b2cc616 (diff)
Updated to undo some of the block/thunk stuff. Thunks are thunks, and
expressions can be grouped with parens, and they have a clear distinction.
Diffstat (limited to 'lib/secrets.nom')
-rw-r--r--lib/secrets.nom16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/secrets.nom b/lib/secrets.nom
index d63ec8c..4c3dca6 100644
--- a/lib/secrets.nom
+++ b/lib/secrets.nom
@@ -1,20 +1,22 @@
require "lib/core.nom"
-compile (with secrets %block) to block: ".."
- |local secrets = {}
- |\(%block as lua statements)
+compile [with secrets %block] to code: ".."
+ |do;
+ | local secrets = {}
+ | \(%block as lua statements)
+ |end;
# Access the lua variable that should be within scope
-compile (secrets) to: "secrets"
+compile [secrets] to: "secrets"
-compile (secret %key; secret value of %key; secret value for %key) to:
+compile [secret %key; secret value of %key; secret value for %key] to:
assert ((%key's "type") == "Var") ".."
|Wrong type, expected Var, but got: \(%key's "type")
"secrets[\(repr (%key's "value"))]"
-compile (secret %key = %new_value) to code:
+compile [secret %key = %new_value] to code:
assert ((%key's "type") == "Var") ".."
|Wrong type, expected Var, but got: \(%key's "type")
"secrets[\(repr (%key's "value"))] = \(%new_value as lua)"
-rule (rules about secrecy) =: ["with secrets %"]
+rule [rules about secrecy] =: ["with secrets %"]