From 733548b80bc5a892dfee0bf9bf8e0f107aaa7466 Mon Sep 17 00:00:00 2001 From: Henri DF Date: Sun, 28 Feb 2016 14:24:54 -0800 Subject: [PATCH] Grammar: fix commas in lists commas were (unintentionally) optional in lists. so a list like (a b c) was a valid three-element list. --- userspace/digwatch/lua/compiler.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/digwatch/lua/compiler.lua b/userspace/digwatch/lua/compiler.lua index a976fbe7..84a6a69f 100644 --- a/userspace/digwatch/lua/compiler.lua +++ b/userspace/digwatch/lua/compiler.lua @@ -99,7 +99,7 @@ end local function list (pat, sep) - return Ct(pat^0 * (sep * pat^0)^0) / function(elements) return {type = "List", elements=elements} end + return Ct(pat^-1 * (sep * pat^0)^0) / function(elements) return {type = "List", elements=elements} end end --http://lua-users.org/wiki/StringTrim