cmake2meson: strip comments from statements

Without this change, the following correct cmake will cause an error:

statement(
    arg1
    # arg2
    arg3
)
This commit is contained in:
Georg Müller 2017-09-14 10:18:26 +02:00
parent c60c21a60d
commit 567b51ac71
1 changed files with 4 additions and 1 deletions

View File

@ -120,7 +120,10 @@ class Parser:
args.append(self.arguments())
self.expect('rparen')
arg = self.current
if self.accept('string') \
if self.accept('comment'):
rest = self.arguments()
args += rest
elif self.accept('string') \
or self.accept('varexp') \
or self.accept('id'):
args.append(arg)