WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/Ace3/Aloft/Libs/TagCompiler-2.0
    from Rev 1305 to Rev 1659
    Reverse comparison

Rev 1305 → Rev 1659

TagCompiler-2.0.lua
282,7 → 282,7
}
 
TagCompiler.CommonTagData.Prefix = {
method = function(data, value, prefix) return value and prefix..value end,
method = function(data, value, prefix) return value and value ~= "" and prefix..value end,
noGuaranteeChange = true,
parameterTypes = { "string" }
}
316,7 → 316,7
selectTag = TagCompiler.CommonTagData.Select
 
TagCompiler.CommonTagData.Surround = {
method = function(data, value, prefix, suffix) return value and prefix..value..suffix end,
method = function(data, value, prefix, suffix) return value and value ~= "" and prefix..value..suffix end,
noGuaranteeChange = true,
parameterTypes = { "string", "string" }
}
377,7 → 377,7
}
 
TagCompiler.CommonTagData.Suffix = {
method = function(data, value, suffix) return value and value..suffix end,
method = function(data, value, suffix) return value and value ~= "" and value..suffix end,
noGuaranteeChange = true,
parameterTypes = { "string" }
}
738,10 → 738,12
local parameterStringList = ParseParameterList(tagData.parameterTypes, identifier)
if not dataTable.error then
if #parameterStringList > 0 then
result = ("tagMethod%s(data, %s, %s)"):format(identifier, functionString or "true", table.concat(parameterStringList, ", "))
-- result = ("tagMethod%s(data, %s, %s)"):format(identifier, functionString or "true", table.concat(parameterStringList, ", "))
result = ('--[[ 3 ]] (tagMethod%s(data, %s, %s) or "")'):format(identifier, functionString or "true", table.concat(parameterStringList, ", "))
parameterStringList = del(parameterStringList)
else
result = ("tagMethod%s(data, %s)"):format(identifier, functionString or "true")
-- result = ("tagMethod%s(data, %s)"):format(identifier, functionString or "true")
result = ('--[[ 2 ]] (tagMethod%s(data, %s) or "")'):format(identifier, functionString or "true")
end
end
end
1020,7 → 1022,7
EmptyTable(dataTable.events)
else
self.tagCompilerData = tagData
headerTable[1] = "local TagCompiler = AceLibrary(\""..MAJOR_VERSION.."\")\n"
headerTable[1] = "local TagCompiler = LibStub(\""..MAJOR_VERSION.."\")\n"
for k in pairs(headerCode) do
headerTable[#headerTable+1] = k
end
1042,6 → 1044,7
 
local method = loadstring(functionString)
dataTable.method = method and method() or TagErrorMethods[resultType]
dataTable.functionString = functionString
end
 
EmptyTable(headerCode)