generic preprocessor-specific exception classes

These are basic python Exception subclasses that can be used to throw
more specific errors and exceptions from within the preprocessor.

AssertionError is not a good idea.
This commit is contained in:
Bryan Bishop
2013-08-31 09:45:12 -05:00
parent a6237d6825
commit 1ce2bccd37

View File

@@ -302,6 +302,16 @@ chars = {
"9": 0xFF "9": 0xFF
} }
class PreprocessorException(Exception):
"""
There was a problem in the preprocessor.
"""
class MacroException(PreprocessorException):
"""
There was a problem with a macro.
"""
def separate_comment(l): def separate_comment(l):
""" """
Separates asm and comments on a single line. Separates asm and comments on a single line.