aboutsummaryrefslogtreecommitdiff
path: root/lib/utils2.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-01-11 03:32:12 -0800
committerBruce Hill <bitbucket@bruce-hill.com>2018-01-11 03:32:12 -0800
commit9d8c7014416b6cffae66497b1c923f862fe6aa1a (patch)
tree27e0c27cf673ebbf0d926a8f2c89de5624965369 /lib/utils2.nom
parentbfe66a70e6fb4ac20253f6d5fb85946ef14ecbc6 (diff)
Added "%'s id" to use UUIDs and changed "% = %" to "set % = %" and some
other misc.
Diffstat (limited to 'lib/utils2.nom')
-rw-r--r--lib/utils2.nom12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/utils2.nom b/lib/utils2.nom
index b0b9dd9..c8fa3b4 100644
--- a/lib/utils2.nom
+++ b/lib/utils2.nom
@@ -15,16 +15,16 @@ compile [do %action] to code:
# With statement
compile [with %assignments %action] to code:
- %data = []
+ set %data = []
for %i = %assignment in (%assignments' "value"):
- %tokens = (%assignment's "value")
- %var = (%tokens -> 1)
- %eq = (%tokens -> 2)
+ set %tokens = (%assignment's "value")
+ set %var = (%tokens -> 1)
+ set %eq = (%tokens -> 2)
assert (=lua "\%eq and \%eq.type == 'Word' and \%eq.value == '='") ".."
Invalid format for 'with' statement. List entries must have the form %var = (value)
- %value = (%tokens -> 3)
+ set %value = (%tokens -> 3)
add {i=%i, var=%var, value=%value} to %data
- %setup = (..)
+ set %setup = (..)
join (..)
"local old_value\(%->"i") = \((%->"var") as lua); \((%->"var") as lua) = \((%->"value") as lua);"
..for all %data