Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8741ed

Browse files
committed
Add pattern for nonlocal keyword
Closes atom#47
1 parent 476a353 commit e8741ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

grammars/python.cson

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@
8080
'name': 'storage.modifier.global.python'
8181
'match': '\\b(global)\\b'
8282
}
83+
{
84+
'captures':
85+
'1':
86+
'name': 'storage.modifier.nonlocal.python'
87+
'match': '\\b(nonlocal)\\b'
88+
}
8389
{
8490
'captures':
8591
'1':
@@ -814,7 +820,7 @@
814820
'generic_names':
815821
'match': '[A-Za-z_][A-Za-z0-9_]*'
816822
'illegal_names':
817-
'match': '\\b(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\\b'
823+
'match': '\\b(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\\b'
818824
'name': 'invalid.illegal.name.python'
819825
'keyword_arguments':
820826
'begin': '\\b([a-zA-Z_][a-zA-Z_0-9]*)\\s*(=)(?!=)'

0 commit comments

Comments
 (0)