cpp2ffi: add ":" to characters in default detection

This commit is contained in:
Victor Bombi
2020-09-06 15:58:03 +02:00
parent 596f3008f6
commit d766b79138

View File

@@ -620,7 +620,7 @@ local function parseFunction(self,stname,lineorig,namespace,locat)
defT.defaults = {}
--for k,def in args:gmatch("([%w%s%*_]+)=([%w_%(%)%s,%*]+)[,%)]") do
--for k,def in args:gmatch("([%w_]+)=([%w_%(%)%s,%*%.%-]+)[,%)]") do
for k,def in args:gmatch('([%w_]+)=([|<%w_%(%)%s,%*%.%-%+%%"]+)[,%)]') do
for k,def in args:gmatch('([%w_]+)=([|<%w_%(%)%s,%*%.%-%+%%:"]+)[,%)]') do
defT.defaults[k]=def
end
defT.templated = self.typenames[stname] and true