laike9m/Cyberbrain

Wrong highlighted line for function parameters

Closed this issue · 1 comments

Example: https://github.com/laike9m/Cyberbrain/blob/master/examples/twelve_days/twelve.py

day should be on line 14, but line 47 is highlighted.

image

Since dealing with global and enclosing vars are very hard, for now we can ignore them. So the fix would be:

  • If initial value comes from an argument, use the correct lineno
  • Otherwise use a special value like -1