[vlc-commits] python: fix trailing comments issue

Olivier Aubert git at videolan.org
Sun Mar 31 20:16:58 CEST 2019


vlc/python | branch: master | Olivier Aubert <contact at olivieraubert.net> | Sun Mar 31 20:07:59 2019 +0200| [3809b510ac259d9b60c825c9409f3a32e7fe7e43] | committer: Olivier Aubert

python: fix trailing comments issue

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=3809b510ac259d9b60c825c9409f3a32e7fe7e43
---

 generator/generate.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/generator/generate.py b/generator/generate.py
index 63b1ea4..5c32671 100755
--- a/generator/generate.py
+++ b/generator/generate.py
@@ -629,9 +629,13 @@ class Parser(object):
 
             else:  # parse line
                 t, m = t.strip(), None
+
                 if s or t.startswith('/*'):  # in comment
                     s = not t.endswith('*/')
+                    m = match_re(t.split('/*', 1)[0])
                 elif a:  # accumulate multi-line
+                    if '/*' in t:
+                        s = not t.endswith('*/')
                     t = t.split('/*', 1)[0].rstrip()  # //?
                     a.append(t)
                     if (t.endswith(ends) if isinstance(ends, basestring) else ends.match(t)):  # end



More information about the vlc-commits mailing list