|
@@ -199,7 +199,7 @@ types.string = types.scalar({
|
|
})
|
|
})
|
|
|
|
|
|
local function toboolean(x)
|
|
local function toboolean(x)
|
|
- return x and true or false
|
|
|
|
|
|
+ return (x and x ~= 'false') and true or false
|
|
end
|
|
end
|
|
|
|
|
|
types.boolean = types.scalar({
|
|
types.boolean = types.scalar({
|
|
@@ -207,7 +207,11 @@ types.boolean = types.scalar({
|
|
serialize = toboolean,
|
|
serialize = toboolean,
|
|
parseValue = toboolean,
|
|
parseValue = toboolean,
|
|
parseLiteral = function(node)
|
|
parseLiteral = function(node)
|
|
- return node.kind == 'boolean' and node.value or nil
|
|
|
|
|
|
+ if node.kind == 'boolean' then
|
|
|
|
+ return toboolean(node.value)
|
|
|
|
+ else
|
|
|
|
+ return nil
|
|
|
|
+ end
|
|
end
|
|
end
|
|
})
|
|
})
|
|
|
|
|