summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-05-13 22:57:22 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-05-13 22:57:22 +0100
commitdea3aac690957e2e5b181ceef3047bad75f75fcb (patch)
tree61a260461e7360568688d3c987e9f7bfab7b0948
parent43551c8898f9037ac213bcd65844444cdd7a6e54 (diff)
downloadlace-dea3aac690957e2e5b181ceef3047bad75f75fcb.tar.gz
Allow suppression of default behaviour
-rw-r--r--lib/lace/compiler.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lace/compiler.lua b/lib/lace/compiler.lua
index 99084e3..ea66092 100644
--- a/lib/lace/compiler.lua
+++ b/lib/lace/compiler.lua
@@ -69,7 +69,7 @@ local function compile_one_line(compcontext, line)
return cmdfn(compcontext, unpack(args))
end
-local function internal_compile_ruleset(compcontext, sourcename, content)
+local function internal_compile_ruleset(compcontext, sourcename, content, suppress_default)
assert(type(compcontext) == "table", "Compilation context must be a table")
assert(type(compcontext[".lace"]) == "table", "Compilation context must contain a .lace table")
assert(type(sourcename) == "string", "Source name must be a string")
@@ -120,11 +120,11 @@ local function internal_compile_ruleset(compcontext, sourcename, content)
-- in which case use the default
-- There's no unconditional result and no default, fake up a default and
-- then use it.
- if not uncond and not result then
+ if not suppress_default and not uncond and not result then
return false, "No result set whatsoever"
end
- if not uncond then
+ if not suppress_default and not uncond then
if not compcontext[".lace"].default then
-- No default, fake one up
builtin.commands.default(compcontext, "default",