-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve Python lexer This includes three changes to the Python lexer: 1) Move the `decorator` rule before the `operator` rule. Before this change, decorators were never getting recognized. This was because if there was ever an `@`, it was always satisfying the `operator` rule. This remedies that by first checking for the `decorator` pattern and then the operator pattern. 2) Recognize functions and classes when they are called. Previously, functions and classes were only recognized when they were defined. With this change, they will also be recognized and styled when they are called. 3) Don't recognize imported modules as `Namespace`s. It is not desirable to highlight imported modules like namespaces. With this change, they are simply recognized as the general `Name` token. * Add more python visual samples * Add python class visual sample --------- Co-authored-by: Tan Le <tan.le@hey.com>
- Loading branch information
1 parent
a4ed658
commit a218f22
Showing
2 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters