aboutsummaryrefslogtreecommitdiff
path: root/core/math.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-09 16:40:36 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-09 16:41:19 -0800
commit69aaea030e08e083151aa25b8080eddd0d4c1683 (patch)
tree6cd90a65e6828f60cc052c4a1b33a4a4c0d65570 /core/math.nom
parenta2f07415c5284bf94c146cea6eed4a15f171b9ab (diff)
No longer passing `tree` to every compile action. Now, you can just
return a LuaCode object, and it will automatically get a source from `tree` if it didn't already have a source. Plus some fixes/cleanup.
Diffstat (limited to 'core/math.nom')
-rw-r--r--core/math.nom8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math.nom b/core/math.nom
index 1c7306e..8951721 100644
--- a/core/math.nom
+++ b/core/math.nom
@@ -85,7 +85,7 @@ externally [all of %items, all %items] all mean:
return (yes)
[all of %items, all %items] all compile to:
unless (%items.type is "List"):
- return %tree
+ return \(all of %items)
if ((size of %items) == 0): return (Lua "true")
%lua = (Lua "(")
%lua::add ((% as lua expr) for % in %items) joined with " and "
@@ -99,7 +99,7 @@ externally [any of %items, any %items] all mean:
return (no)
[any of %items, any %items] all compile to:
unless (%items.type is "List"):
- return %tree
+ return \(any of %items)
if ((size of %items) == 0): return (Lua "false")
%lua = (Lua "(")
%lua::add ((% as lua expr) for % in %items) joined with " or "
@@ -114,7 +114,7 @@ externally [sum of %items, sum %items] all mean:
return %total
[sum of %items, sum %items] all compile to:
unless (%items.type is "List"):
- return %tree
+ return \(sum of %items)
if ((size of %items) == 0): return (Lua "0")
%lua = (Lua "(")
%lua::add ((% as lua expr) for % in %items) joined with " + "
@@ -127,7 +127,7 @@ externally [product of %items, product %items] all mean:
return %prod
[product of %items, product %items] all compile to:
unless (%items.type is "List"):
- return %tree
+ return \(product of %items)
if ((size of %items) == 0): return (Lua "1")
%lua = (Lua "(")
%lua::add ((% as lua expr) for % in %items) joined with " * "