Baby steps towards building a platform --- make the assembler work.

Add ackbuilder support for C preprocessor files and yacc.
This commit is contained in:
David Given
2016-07-24 00:50:02 +02:00
parent 2770a83837
commit bff5c4019c
8 changed files with 214 additions and 5 deletions

View File

@@ -375,6 +375,13 @@ local typeconverters = {
return i
end,
boolean = function(propname, i)
if (type(i) ~= "boolean") then
error(string.format("property '%s' must be a boolean", propname))
end
return i
end,
string = function(propname, i)
if (type(i) ~= "string") then
error(string.format("property '%s' must be a string", propname))
@@ -410,7 +417,7 @@ local function definerule(rulename, types, cb)
local args = {}
for propname, typespec in pairs(types) do
if not e[propname] then
if not typespec.optional and not typespec.default then
if not typespec.optional and (typespec.default == nil) then
error(string.format("missing mandatory property '%s'", propname))
end