Feat: simplify "no * allowed token"

This commit is contained in:
Bertrand Benjamin 2021-09-29 16:13:02 +02:00
parent d6e3f774fa
commit daed07efa3

View File

@ -395,11 +395,7 @@ def missing_times(target):
elif not is_operator(tok) and tok != ")": elif not is_operator(tok) and tok != ")":
target_.send("*") target_.send("*")
if ( if not ( is_operator(tok) or tok =="(" ):
isinstance(tok, int)
or (isinstance(tok, str) and not is_operator(tok) and not tok == "(")
or (isinstance(tok, RdLeaf))
):
previous = tok previous = tok
target_.send(tok) target_.send(tok)