fparser
fparser copied to clipboard
fparser2 fails to generate code if Specification Part is empty
In PSyclone we still manipulate the fparser2 parse tree in certain circumstances. I've found that if one deletes all the content from a Specification_Part node then asking for the string representation of the parse tree fails with:
> start = self.content[0]
E IndexError: list index out of range
/home/me/.python_envs/py3/lib/python3.8/site-packages/fparser/two/utils.py:774: IndexError
I would expect this to just return an empty string.