table: added support for booleans

This commit is contained in:
Erkki Seppälä 2014-10-26 10:29:25 +02:00
parent 42a4e01120
commit b8198f1add

View file

@ -59,7 +59,7 @@ do
file:write( charS.."{"..lookup[v].."},"..charE ) file:write( charS.."{"..lookup[v].."},"..charE )
elseif stype == "string" then elseif stype == "string" then
file:write( charS..exportstring( v )..","..charE ) file:write( charS..exportstring( v )..","..charE )
elseif stype == "number" then elseif stype == "number" or stype == "boolean" then
file:write( charS..tostring( v )..","..charE ) file:write( charS..tostring( v )..","..charE )
end end
end end
@ -79,7 +79,7 @@ do
str = charS.."[{"..lookup[i].."}]=" str = charS.."[{"..lookup[i].."}]="
elseif stype == "string" then elseif stype == "string" then
str = charS.."["..exportstring( i ).."]=" str = charS.."["..exportstring( i ).."]="
elseif stype == "number" then elseif stype == "number" or stype == "boolean" then
str = charS.."["..tostring( i ).."]=" str = charS.."["..tostring( i ).."]="
end end
@ -94,7 +94,7 @@ do
file:write( str.."{"..lookup[v].."},"..charE ) file:write( str.."{"..lookup[v].."},"..charE )
elseif stype == "string" then elseif stype == "string" then
file:write( str..exportstring( v )..","..charE ) file:write( str..exportstring( v )..","..charE )
elseif stype == "number" then elseif stype == "number" or stype == "boolean" then
file:write( str..tostring( v )..","..charE ) file:write( str..tostring( v )..","..charE )
end end
end end