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,10 +13,12 @@ def main():
|
||||||
2 + 3 / (8 - 1 + 3) * 1
|
2 + 3 / (8 - 1 + 3) * 1
|
||||||
+ 34.2
|
+ 34.2
|
||||||
"""
|
"""
|
||||||
|
print("Source:\n", data)
|
||||||
tokenizer = Tokenizer()
|
tokenizer = Tokenizer()
|
||||||
tokens = tokenizer.tokenize(data)
|
tokens = tokenizer.tokenize(data)
|
||||||
|
|
||||||
tokens = [token for token in tokens if token.kind not in [Tokens.Blank, Tokens.Newline]]
|
tokens = [token for token in tokens if token.kind not in [Tokens.Blank, Tokens.Newline]]
|
||||||
|
if rootLogger.level <= LogLevel.Debug:
|
||||||
pprint(tokens)
|
pprint(tokens)
|
||||||
|
|
||||||
parser = Parser(tokens)
|
parser = Parser(tokens)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue