diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-06-01 23:27:12 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-06-01 23:27:12 +0300 |
commit | 6d3e9be0e55ff198a310d88faace2ab25ce88ca2 (patch) | |
tree | 1b4480082f433c5b2caf0d10086fffcff3b0940a /tools | |
parent | 4652088c187b7de0aba8f1afff02c70200443d94 (diff) | |
download | meson-6d3e9be0e55ff198a310d88faace2ab25ce88ca2.zip meson-6d3e9be0e55ff198a310d88faace2ab25ce88ca2.tar.gz meson-6d3e9be0e55ff198a310d88faace2ab25ce88ca2.tar.bz2 |
Some moar fixing.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/cmake2meson.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/cmake2meson.py b/tools/cmake2meson.py index 359c6ee..c2b7309 100755 --- a/tools/cmake2meson.py +++ b/tools/cmake2meson.py @@ -35,7 +35,7 @@ class Lexer: # Need to be sorted longest to shortest. ('ignore', re.compile(r'[ \t]')), ('string', re.compile(r'"([^\\]|(\\.))*?"', re.M)), - ('id', re.compile('''[-=+_0-9a-z/A-Z@.*]+''')), + ('id', re.compile('''[,-=+_0-9a-z/A-Z@.*]+''')), ('eol', re.compile(r'\n')), ('comment', re.compile(r'\#.*')), ('lparen', re.compile(r'\(')), @@ -113,16 +113,15 @@ class Parser(): def arguments(self): args = [] - arg = self.current.value if self.accept('lparen'): args.append(self.arguments()) self.expect('rparen') + arg = self.current.value if self.accept('string') or self.accept('varexp') or\ self.accept('id'): args.append(arg) rest = self.arguments() - if len(rest) > 0: - args.append(rest) + args += rest return args def parse(self): |