Open AndreiDreyer opened 5 months ago
Very strange, if I re-indent the whitespace for user.save()
I parse successfully. Perhaps a fix for this issue should be robust to the whitespace.
Specifically, the user.save()
is the problem. There are three tabs before it, but the third tab closest is the issue.
Detailed error from the parser is
Encountered " <NAME> "user "" at line 7, column 4.
Was expecting:
<INDENT> ...
From the message above, if I add another
Using a formatter seems to help here:
cd pygoat
pip3 install black
black .
Then I no longer get parser issues.
Not ideal, this is only a workaround, but should unblock this issue.
Describe the bug When trying to generate a cpg of the following repo Pygoat, the python parser shows two warnings for lines of code it considers Invalid.
These relate to the following functions:
To Reproduce Steps to reproduce the behavior: 1) Create
test.py
with the following:2)
./joern-parse test.py
1) Create
test.py
with the following:2)
./joern-parse test.py
save
function is defined in the class, but parses fine if it is defined in the top level of the programExpected behavior No parsing warning shown for the above code.
Desktop (please complete the following information):