We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d05991 commit 304a633Copy full SHA for 304a633
pypreprocessor/__init__.py
@@ -317,6 +317,12 @@ def lexer(self, line):
317
print('Warning trying to remove more blocks than present',
318
self.input, self.__linenum)
319
320
+ elif self.__is_directive(line, 'error'):
321
+ if self.__validate_ifs():
322
+ print('File: "' + self.input + '", line ' + str(self.__linenum + 1))
323
+ print('Error directive reached')
324
+ sys.exit(1)
325
+
326
else:
327
# escapechar + space ==> comment
328
# starts with #!/ ==> shebang
0 commit comments