rouge icon indicating copy to clipboard operation
rouge copied to clipboard

Fix python call syntax highlighting

Open pencels opened this issue 2 years ago • 0 comments

Summary

Fixes an issue with the Python lexer where any identifier used before an opening paren ( would be highlighted as a function name. This led to inconsistent highlighting in the case of for loops, where one for would be rendered as a keyword while the other was rendered as a function name:

image

This pull request also addresses other edge cases for call expressions:

  • distinguishes Exception classes from normal classes in a call expr context
  • distinguishes Builtin calls from identically named method calls

Visual Before and After

Before After
Screenshot 2023-08-20 132415 Screenshot 2023-08-20 132000

pencels avatar Aug 20 '23 20:08 pencels