Skip to content

Commit 54bccc4

Browse files
committed
Highlight __prepare__, __path__, __package__
1 parent f2dfad8 commit 54bccc4

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

Diff for: grammars/MagicPython.cson

+2-1
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ repository:
17911791
| rtruediv | rxor | set | setattr | setitem | setslice
17921792
| setstate | sizeof | str | sub | subclasscheck | truediv
17931793
| trunc | unicode | xor | matmul | rmatmul | imatmul
1794-
| init_subclass | set_name | fspath | bytes
1794+
| init_subclass | set_name | fspath | bytes | prepare
17951795
)__
17961796
)\\b
17971797
@@ -1810,6 +1810,7 @@ repository:
18101810
| metaclass | methods | module | mro | name
18111811
| qualname | self | signature | slots | subclasses
18121812
| version | weakref | wrapped | annotations | classcell
1813+
| spec | path | package
18131814
)__
18141815
)\\b
18151816

Diff for: grammars/MagicPython.tmLanguage

+2-1
Original file line numberDiff line numberDiff line change
@@ -2761,7 +2761,7 @@ indirectly through syntactic constructs
27612761
| rtruediv | rxor | set | setattr | setitem | setslice
27622762
| setstate | sizeof | str | sub | subclasscheck | truediv
27632763
| trunc | unicode | xor | matmul | rmatmul | imatmul
2764-
| init_subclass | set_name | fspath | bytes
2764+
| init_subclass | set_name | fspath | bytes | prepare
27652765
)__
27662766
)\b
27672767
</string>
@@ -2787,6 +2787,7 @@ indirectly through syntactic constructs
27872787
| metaclass | methods | module | mro | name
27882788
| qualname | self | signature | slots | subclasses
27892789
| version | weakref | wrapped | annotations | classcell
2790+
| spec | path | package
27902791
)__
27912792
)\b
27922793
</string>

Diff for: grammars/src/MagicPython.syntax.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ repository:
13301330
| rtruediv | rxor | set | setattr | setitem | setslice
13311331
| setstate | sizeof | str | sub | subclasscheck | truediv
13321332
| trunc | unicode | xor | matmul | rmatmul | imatmul
1333-
| init_subclass | set_name | fspath | bytes
1333+
| init_subclass | set_name | fspath | bytes | prepare
13341334
)__
13351335
)\b
13361336
captures:
@@ -1347,6 +1347,7 @@ repository:
13471347
| metaclass | methods | module | mro | name
13481348
| qualname | self | signature | slots | subclasses
13491349
| version | weakref | wrapped | annotations | classcell
1350+
| spec | path | package
13501351
)__
13511352
)\b
13521353
captures:

Diff for: test/builtins/builtins3.py

+16
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
some.__fspath__
3636
some.__classcell__
3737
some.__bytes__
38+
some.__spec__
39+
some.__path__
40+
some.__prepare__
41+
some.__package__
3842
some.__notspecial__
3943

4044

@@ -163,4 +167,16 @@
163167
__bytes__ : source.python, support.function.magic.python
164168
some : source.python
165169
. : source.python
170+
__spec__ : source.python, support.variable.magic.python
171+
some : source.python
172+
. : source.python
173+
__path__ : source.python, support.variable.magic.python
174+
some : source.python
175+
. : source.python
176+
__prepare__ : source.python, support.function.magic.python
177+
some : source.python
178+
. : source.python
179+
__package__ : source.python, support.variable.magic.python
180+
some : source.python
181+
. : source.python
166182
__notspecial__ : source.python

0 commit comments

Comments
 (0)