Skip to content

Commit 9882af4

Browse files
committed
Highlight __wrapped__ and __code__
1 parent eabba01 commit 9882af4

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

grammars/MagicPython.cson

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,9 +1627,9 @@ repository:
16271627
(?x)
16281628
(\\.)?\\b(
16291629
__(?:
1630-
all | bases | class | debug | dict | doc | file | members
1630+
all | bases | class | code | debug | dict | doc | file | members
16311631
| metaclass | methods | module | mro | name | qualname | slots
1632-
| subclasses | version | weakref
1632+
| subclasses | version | weakref | wrapped
16331633
)__
16341634
)\\b
16351635

grammars/MagicPython.tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2561,9 +2561,9 @@ indirectly through syntactic constructs
25612561
<string>(?x)
25622562
(\.)?\b(
25632563
__(?:
2564-
all | bases | class | debug | dict | doc | file | members
2564+
all | bases | class | code | debug | dict | doc | file | members
25652565
| metaclass | methods | module | mro | name | qualname | slots
2566-
| subclasses | version | weakref
2566+
| subclasses | version | weakref | wrapped
25672567
)__
25682568
)\b
25692569
</string>

grammars/src/MagicPython.syntax.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,9 +1107,9 @@ repository:
11071107
(?x)
11081108
(\.)?\b(
11091109
__(?:
1110-
all | bases | class | debug | dict | doc | file | members
1110+
all | bases | class | code | debug | dict | doc | file | members
11111111
| metaclass | methods | module | mro | name | qualname | slots
1112-
| subclasses | version | weakref
1112+
| subclasses | version | weakref | wrapped
11131113
)__
11141114
)\b
11151115
captures:

test/builtins/builtins3.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
some.__version__
1717
some.__weakref__
1818
some.__qualname__
19+
some.__code__
20+
some.__wrapped__
1921
some.__notspecial__
2022

2123

@@ -87,5 +89,11 @@
8789
__qualname__ : source.python, support.variable.magic.python
8890
some : source.python
8991
. : source.python
92+
__code__ : source.python, support.variable.magic.python
93+
some : source.python
94+
. : source.python
95+
__wrapped__ : source.python, support.variable.magic.python
96+
some : source.python
97+
. : source.python
9098
__notspecial__ : source.python
9199
: source.python

0 commit comments

Comments
 (0)