Skip to content

Commit 32015c2

Browse files
committed
Highlight __matmul__, __rmatmul__, and __imatmul__
1 parent 255ca8e commit 32015c2

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

grammars/MagicPython.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ repository:
17901790
| rmul | ror | round | rpow | rrshift | rshift | rsub
17911791
| rtruediv | rxor | set | setattr | setitem | setslice
17921792
| setstate | sizeof | str | sub | subclasscheck | truediv
1793-
| trunc | unicode | xor
1793+
| trunc | unicode | xor | matmul | rmatmul | imatmul
17941794
)__
17951795
)\\b
17961796

grammars/MagicPython.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2760,7 +2760,7 @@ indirectly through syntactic constructs
27602760
| rmul | ror | round | rpow | rrshift | rshift | rsub
27612761
| rtruediv | rxor | set | setattr | setitem | setslice
27622762
| setstate | sizeof | str | sub | subclasscheck | truediv
2763-
| trunc | unicode | xor
2763+
| trunc | unicode | xor | matmul | rmatmul | imatmul
27642764
)__
27652765
)\b
27662766
</string>

grammars/src/MagicPython.syntax.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ repository:
13291329
| rmul | ror | round | rpow | rrshift | rshift | rsub
13301330
| rtruediv | rxor | set | setattr | setitem | setslice
13311331
| setstate | sizeof | str | sub | subclasscheck | truediv
1332-
| trunc | unicode | xor
1332+
| trunc | unicode | xor | matmul | rmatmul | imatmul
13331333
)__
13341334
)\b
13351335
captures:

test/builtins/builtins3.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
some.__func__
2727
some.__self__
2828
some.__kwdefaults__
29+
some.__matmul__
30+
some.__imatmul__
31+
some.__rmatmul__
2932
some.__notspecial__
3033

3134

@@ -127,4 +130,13 @@
127130
__kwdefaults__ : source.python, support.variable.magic.python
128131
some : source.python
129132
. : source.python
133+
__matmul__ : source.python, support.function.magic.python
134+
some : source.python
135+
. : source.python
136+
__imatmul__ : source.python, support.function.magic.python
137+
some : source.python
138+
. : source.python
139+
__rmatmul__ : source.python, support.function.magic.python
140+
some : source.python
141+
. : source.python
130142
__notspecial__ : source.python

0 commit comments

Comments
 (0)