aboutsummaryrefslogtreecommitdiff
path: root/tools/cmake2meson.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-06-01 23:39:07 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-06-01 23:39:07 +0300
commit4063efcf6a63aaf3d057a70993009350402989b9 (patch)
tree18bf67ee749c7a334d00453dd321daf4c6963510 /tools/cmake2meson.py
parent6d3e9be0e55ff198a310d88faace2ab25ce88ca2 (diff)
downloadmeson-4063efcf6a63aaf3d057a70993009350402989b9.zip
meson-4063efcf6a63aaf3d057a70993009350402989b9.tar.gz
meson-4063efcf6a63aaf3d057a70993009350402989b9.tar.bz2
Store whole token.
Diffstat (limited to 'tools/cmake2meson.py')
-rwxr-xr-xtools/cmake2meson.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/cmake2meson.py b/tools/cmake2meson.py
index c2b7309..ccb2419 100755
--- a/tools/cmake2meson.py
+++ b/tools/cmake2meson.py
@@ -116,7 +116,7 @@ class Parser():
if self.accept('lparen'):
args.append(self.arguments())
self.expect('rparen')
- arg = self.current.value
+ arg = self.current
if self.accept('string') or self.accept('varexp') or\
self.accept('id'):
args.append(arg)
@@ -138,8 +138,8 @@ def convert(cmake_root):
p = Parser(cmakecode)
for t in p.parse():
if t.name == 'add_subdirectory':
- print('\nRecursing to subdir', os.path.join(cmake_root, t.args[0]), '\n')
- convert(os.path.join(cmake_root, t.args[0]))
+ print('\nRecursing to subdir', os.path.join(cmake_root, t.args[0].value), '\n')
+ convert(os.path.join(cmake_root, t.args[0].value))
print('\nReturning to', cmake_root, '\n')
else:
print(t.name, t.args)