I ran into an issue with parsing match statements in python. Unlike other languages it does not seem to have a unique Node type for match statements (where languages such as C# and Java have switch statements).
I have been used the playground to see the structure of the tree produced.
You can use the following piece of python code to recreate the problem:
match term:
case pattern1:
print(1)
case pattern2:
print(2)
case pattern3:
print(3)
case default:
print(0)
The resulting tree of parsing the before mentioned code piece looks like this:
Hi there.
I ran into an issue with parsing match statements in python. Unlike other languages it does not seem to have a unique Node type for match statements (where languages such as C# and Java have switch statements).
I have been used the playground to see the structure of the tree produced.
You can use the following piece of python code to recreate the problem:
The resulting tree of parsing the before mentioned code piece looks like this:
Here are some pictures from the playground as well: