❯ cat examples/expr2.py
def has(a, b):
return a in b
❯ lpy --show-ast examples/expr2.py --tree # Old Parser
└-Module
|-body=↧
| └-FunctionDef
| |-name=has
| |-args=
| | |-posonlyargs=↧
| | |-args=↧
| | | |-
| | | | |-arg=a
| | | | |-annotation=()
| | | | └-type_comment=()
| | | └-
| | | |-arg=b
| | | |-annotation=()
| | | └-type_comment=()
| | |-vararg=↧
| | |-kwonlyargs=↧
| | |-kw_defaults=↧
| | |-kwarg=↧
| | └-defaults=↧
| |-body=↧
| | └-Return
| | └-value=Compare
| | |-left=Name
| | | |-id=a
| | | └-expr_contextType=Load
| | |-cmpopType=In
| | └-comparators=↧
| | └-Name
| | |-id=b
| | └-expr_contextType=Load
| |-decorator_list=↧
| |-returns=()
| └-type_comment=()
└-type_ignores=↧
❯ lpy --show-ast --new-parser examples/expr2.py --tree # New Parser
syntax error: Token 'in' is unexpected here
--> examples/expr2.py:2:14
|
2 | return a in b
| ^^
Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that needs to be fixed).