Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def runTest(self):
import doctest, pcpp.preprocessor
failurecount, testcount = doctest.testmod(pcpp.preprocessor)
#self.assertGreater(testcount, 0)
self.assertEqual(failurecount, 0)
"""
if evaluating:
return self.conditional_expression(evaluating)
while True:
result = self.conditional_expression(evaluating)
if not self.eat(','):
return result
def evaluate(self):
result = self.expression(True)
# Did we eat all tokens?
self.expect('END')
return result
class Preproc(preprocessor.Preprocessor):
def __init__(self, input, defines=(), sysincpaths=(), incpaths=()):
super(Preproc, self).__init__()
self.auto_pragma_once_enabled = False
for define in defines:
self.define('%s %s' % define)
for v in sysincpaths:
self.add_path(v)
for v in incpaths:
self.add_path(v)
self.ignore = set()
self.parser = self.parsegen(input, '', '')
def get(self):
try: