Tobias-Kohn / TigerPython-Parser

Enhanced error recognition in Python
Mozilla Public License 2.0
39 stars 6 forks source link

Fix empty global causing exception #12

Open neilccbrown opened 2 months ago

neilccbrown commented 2 months ago

See #11 -- global keyword followed by nothing causes an exception. This simple PR adds a test proving the issue, and then a fix which makes the test work. (I'm not sure if NAME_EXPECTED is the most suitable error, but it was the one given if you have a trailing comma with nothing after, so it seemed like a reasonable choice.)

Fixes #11