[geany/geany-plugins] 3a2144: geanylua: Fix parsing of trailing spaces in mkiface

Colomban Wendling git-noreply at xxxxx
Thu Apr 23 00:05:32 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Thu, 23 Apr 2015 00:05:32 UTC
Commit:      3a2144567ceff85fd0b01ec389172fe8fadf20a9
             https://github.com/geany/geany-plugins/commit/3a2144567ceff85fd0b01ec389172fe8fadf20a9

Log Message:
-----------
geanylua: Fix parsing of trailing spaces in mkiface

Latest Scintilla interface file has a few trailing spaces which
confuses the mkiface script.  So, fix it to ignore those.


Modified Paths:
--------------
    geanylua/util/mkiface.lua

Modified: geanylua/util/mkiface.lua
7 lines changed, 3 insertions(+), 4 deletions(-)
===================================================================
@@ -69,16 +69,15 @@ do
     rvtype=line:gsub("...%s+([^%s]+).*", "%1")
     rvtype=translate_typename(rvtype)
     arglist=line:gsub("^.*%(", "(")
-    wparam=arglist:gsub("%(([^,]-),.*","%1")
+    wparam=arglist:gsub("%(%s*([^,]-),.*","%1")
     if (wparam~="") then
-      wparam=wparam:gsub("^%s*","")
       wparam=wparam:gsub("%s.*$","")
       wparam=translate_typename(wparam)
     else
       wparam="void"
     end
-    lparam=arglist:gsub("^[^,]*,%s*","")
-    if (lparam~=")") then
+    lparam=arglist:gsub("^[^,]*,%s*([^)]-)%).*","%1")
+    if (lparam~="") then
       lparam=lparam:gsub("%s.*","")
       lparam=translate_typename(lparam)
     else



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list