diff options
Diffstat (limited to 'tools/lib/python/kdoc/c_lex.py')
| -rw-r--r-- | tools/lib/python/kdoc/c_lex.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/lib/python/kdoc/c_lex.py b/tools/lib/python/kdoc/c_lex.py index e01b154f458e..cb95f5172448 100644 --- a/tools/lib/python/kdoc/c_lex.py +++ b/tools/lib/python/kdoc/c_lex.py @@ -177,7 +177,7 @@ class CTokenizer(): # This class is inspired and follows the basic concepts of: # https://docs.python.org/3/library/re.html#writing-a-tokenizer - def __init__(self, source=None, log=None): + def __init__(self, source=None): """ Create a regular expression to handle RE_SCANNER_LIST. @@ -188,6 +188,12 @@ class CTokenizer(): when matching a code via RE_SCANNER. """ + # + # Store logger to allow parser classes to re-use it + # + global log + self.log = log + self.tokens = [] if not source: |
