cmake2meson: strip comments from statements
Without this change, the following correct cmake will cause an error:
statement(
arg1
# arg2
arg3
)
@@ -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)
