Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: c_lex.py: store logger on its data

By having the logger stored there, any code using CTokenizer can
log messages there.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <467979dc18149e4b2a7113c178e0cb07919632f2.1774256269.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
2ca0b54d 9c391181

+7 -1
+7 -1
tools/lib/python/kdoc/c_lex.py
··· 177 177 # This class is inspired and follows the basic concepts of: 178 178 # https://docs.python.org/3/library/re.html#writing-a-tokenizer 179 179 180 - def __init__(self, source=None, log=None): 180 + def __init__(self, source=None): 181 181 """ 182 182 Create a regular expression to handle RE_SCANNER_LIST. 183 183 ··· 187 187 in this particular case, it makes sense, as we can pick the name 188 188 when matching a code via RE_SCANNER. 189 189 """ 190 + 191 + # 192 + # Store logger to allow parser classes to re-use it 193 + # 194 + global log 195 + self.log = log 190 196 191 197 self.tokens = [] 192 198