aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nomsu_tree.lua2
-rw-r--r--nomsu_tree.moon2
-rw-r--r--tests/operators.nom2
3 files changed, 3 insertions, 3 deletions
diff --git a/nomsu_tree.lua b/nomsu_tree.lua
index 93588c4..cba4fed 100644
--- a/nomsu_tree.lua
+++ b/nomsu_tree.lua
@@ -153,7 +153,7 @@ Tree("Block", {
return nomsu
end
})
-local math_expression = re.compile([[ "%" (" " [*/^+-] " %")+ ]])
+local math_expression = re.compile([[ "%" (" " [*/^+-] " %")+ !. ]])
Tree("Action", {
as_lua = function(self, nomsu)
local stub = self:get_stub()
diff --git a/nomsu_tree.moon b/nomsu_tree.moon
index 2b4cc0a..00b21c9 100644
--- a/nomsu_tree.moon
+++ b/nomsu_tree.moon
@@ -103,7 +103,7 @@ Tree "Block",
nomsu\append "\n"
return nomsu
-math_expression = re.compile [[ "%" (" " [*/^+-] " %")+ ]]
+math_expression = re.compile [[ "%" (" " [*/^+-] " %")+ !. ]]
Tree "Action",
as_lua: (nomsu)=>
stub = @get_stub!
diff --git a/tests/operators.nom b/tests/operators.nom
index 40c503f..6a749d8 100644
--- a/tests/operators.nom
+++ b/tests/operators.nom
@@ -40,7 +40,7 @@ with {%z:nil, %x:999}
assume (%x = 1) or barf "'with' scoping failed"
assume (%z = (nil)) or barf "'with' scoping failed"
-assume ((1+2*3-4/2^2) = 6) or barf "math expressions not working properly"
+assume ((1 + 2*3 - 4/2^2) = 6) or barf "math expressions not working properly"
assume ((5 wrapped around 2) = 1) or barf "mod not working"
assume (1 <= 2 < 3) or barf "chained operator fail."
%value <- -999