main: only print tokens if in debug mode
This commit is contained in:
parent
bd402beba7
commit
585910a60b
1 changed files with 3 additions and 1 deletions
|
|
@ -13,11 +13,13 @@ def main():
|
|||
2 + 3 / (8 - 1 + 3) * 1
|
||||
+ 34.2
|
||||
"""
|
||||
print("Source:\n", data)
|
||||
tokenizer = Tokenizer()
|
||||
tokens = tokenizer.tokenize(data)
|
||||
|
||||
tokens = [token for token in tokens if token.kind not in [Tokens.Blank, Tokens.Newline]]
|
||||
pprint(tokens)
|
||||
if rootLogger.level <= LogLevel.Debug:
|
||||
pprint(tokens)
|
||||
|
||||
parser = Parser(tokens)
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue