Skip to content

Commit 4341b72

Browse files
author
MattDMo
committed
Change async before def to storage.modifer.async from #60
1 parent 8bbfd91 commit 4341b72

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

PythonImproved.YAML-tmLanguage

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,10 @@ patterns:
192192
- include: $self
193193

194194
- name: meta.function.python
195-
begin: \s*((?:async\s+)?def)\s+(?=[[:alpha:]_][[:alnum:]_]*)
195+
begin: \s*(?:(async)\s+)?(def)\s+(?=[[:alpha:]_][[:alnum:]_]*)
196196
beginCaptures:
197-
'1': {name: storage.type.function.python}
197+
'1': {name: storage.modifier.async.python}
198+
'2': {name: storage.type.function.python}
198199
end: (\()|\s*($\n?|#.*$\n?)
199200
endCaptures:
200201
'1': {name: punctuation.definition.parameters.begin.python}
@@ -206,9 +207,11 @@ patterns:
206207
patterns:
207208
- include: '#entity_name_function'
208209

209-
- match: \b(((?:async\s+)?def)|lambda)\b
210-
captures:
211-
'1': {name: storage.type.function.python}
210+
- match: \b(?:(?:(async)\s+)?(def)|(lambda))\b
211+
captures:
212+
'1': {name: storage.modifier.async.python}
213+
'2': {name: storage.type.function.python}
214+
'3': {name: storage.type.function.inline.python}
212215

213216
- comment: 'Keywords that delimit flow blocks or alter flow from within a
214217
block. This block should be matched *after* meta.function.python to

0 commit comments

Comments
 (0)