Last elif clause node is created and added to parts as a list.
When parsing the next elif (bottom-up order), as the last part is a list,
then it wrongly created a ReservedWord node and add the previous list as word.
The solution is to extend parts to include previous parts.
Hey, thanks for separating this. Can you please add a test? You had an example in the original pull request, something simple along those lines can work. Thanks!
Last elif clause node is created and added to parts as a list. When parsing the next elif (bottom-up order), as the last part is a list, then it wrongly created a ReservedWord node and add the previous list as word. The solution is to extend parts to include previous parts.