Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 6e5de57

Browse files
aminyaGrayJack
andcommitted
Support self matching
Co-Authored-By: Eric Shimizu Karbstein <[email protected]>
1 parent 98cab19 commit 6e5de57

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

grammars/tree-sitter-python.cson

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ scopes:
8282
]
8383
'call > attribute > identifier:nth-child(2)': 'entity.name.function'
8484

85-
'identifier':
85+
'identifier': [
8686
{match:
8787
'^(BaseException|Exception|TypeError|StopAsyncIteration|StopIteration|ImportError|ModuleNotFoundError|OSError|ConnectionError|BrokenPipeError|ConnectionAbortedError|ConnectionRefusedError|ConnectionResetError|BlockingIOError|ChildProcessError|FileExistsError|FileNotFoundError|IsADirectoryError|NotADirectoryError|InterruptedError|PermissionError|ProcessLookupError|TimeoutError|EOFError|RuntimeError|RecursionError|NotImplementedError|NameError|UnboundLocalError|AttributeError|SyntaxError|IndentationError|TabError|LookupError|IndexError|KeyError|ValueError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|AssertionError|ArithmeticError|FloatingPointError|OverflowError|ZeroDivisionError|SystemError|ReferenceError|BufferError|MemoryError|Warning|UserWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|RuntimeWarning|FutureWarning|ImportWarning|UnicodeWarning|BytesWarning|ResourceWarning|GeneratorExit|SystemExit|KeyboardInterrupt)$'
88-
scopes: 'support.type.exception'}
88+
scopes: 'support.type.exception'},
89+
{match: '^(self)', scopes: 'entity.name.variable.self'}
90+
]
8991

9092
'attribute > identifier:nth-child(2)': 'variable.other.object.property'
9193

0 commit comments

Comments
 (0)