Skip to content

Commit 9cdf8e3

Browse files
committed
Make the scope for opening/closing parenthesis and brackets consistent.
1 parent 11342d4 commit 9cdf8e3

35 files changed

+51
-57
lines changed

grammars/MagicPython.cson

+1-2
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,6 @@ repository:
12101210
}
12111211
]
12121212
"item-index":
1213-
name: "meta.item-access.arguments.python"
12141213
begin: "(\\[)"
12151214
end: "(?=\\])"
12161215
beginCaptures:
@@ -1364,12 +1363,12 @@ repository:
13641363
}
13651364
]
13661365
"function-arguments":
1367-
name: "meta.function-call.arguments.python"
13681366
begin: "(\\()"
13691367
end: "(?=\\))(?!\\)\\s*\\()"
13701368
beginCaptures:
13711369
"1":
13721370
name: "punctuation.definition.arguments.begin.python"
1371+
contentName: "meta.function-call.arguments.python"
13731372
patterns: [
13741373
{
13751374
name: "punctuation.separator.arguments.python"

grammars/MagicPython.syntax.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,6 @@ repository:
814814
\b ([[:alpha:]_]\w*) \b
815815
816816
item-index:
817-
name: meta.item-access.arguments.python
818817
begin: (\[)
819818
end: (?=\])
820819
beginCaptures:
@@ -909,11 +908,11 @@ repository:
909908
\b ([[:alpha:]_]\w*) \b
910909
911910
function-arguments:
912-
name: meta.function-call.arguments.python
913911
begin: (\()
914912
end: (?=\))(?!\)\s*\()
915913
beginCaptures:
916914
'1': {name: punctuation.definition.arguments.begin.python}
915+
contentName: meta.function-call.arguments.python
917916
patterns:
918917
- name: punctuation.separator.arguments.python
919918
match: ','

grammars/MagicPython.tmLanguage

+2-4
Original file line numberDiff line numberDiff line change
@@ -1968,8 +1968,6 @@ it's not tokenized as ellipsis.
19681968
</dict>
19691969
<key>item-index</key>
19701970
<dict>
1971-
<key>name</key>
1972-
<string>meta.item-access.arguments.python</string>
19731971
<key>begin</key>
19741972
<string>(\[)</string>
19751973
<key>end</key>
@@ -2201,8 +2199,6 @@ it&apos;s not tokenized as ellipsis.
22012199
</dict>
22022200
<key>function-arguments</key>
22032201
<dict>
2204-
<key>name</key>
2205-
<string>meta.function-call.arguments.python</string>
22062202
<key>begin</key>
22072203
<string>(\()</string>
22082204
<key>end</key>
@@ -2215,6 +2211,8 @@ it&apos;s not tokenized as ellipsis.
22152211
<string>punctuation.definition.arguments.begin.python</string>
22162212
</dict>
22172213
</dict>
2214+
<key>contentName</key>
2215+
<string>meta.function-call.arguments.python</string>
22182216
<key>patterns</key>
22192217
<array>
22202218
<dict>

misc/scopes

-2
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ meta.character.set.regexp
5252
meta.class.inheritance.python
5353
meta.class.python
5454
meta.expression.python
55-
meta.function-call.arguments.python
5655
meta.function-call.generic.python
5756
meta.function-call.python
5857
meta.function.decorator.python
5958
meta.function.parameters.python
6059
meta.function.python
61-
meta.item-access.arguments.python
6260
meta.item-access.python
6361
meta.lambda-function.python
6462
meta.named.regexp

test/calls/call1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44

55
some_call : meta.function-call.generic.python, meta.function-call.python, source.python
6-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
6+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
77
A : constant.other.caps.python, meta.function-call.arguments.python, meta.function-call.python, source.python
88
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
99
b : meta.function-call.arguments.python, meta.function-call.python, source.python
1010
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
1111
: meta.function-call.arguments.python, meta.function-call.python, source.python
1212
c : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, source.python
13-
[ : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.arguments.python, meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
13+
[ : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
1414
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, meta.item-access.arguments.python, meta.item-access.python, source.python
1515
] : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, punctuation.definition.arguments.end.python, source.python
1616
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python

test/calls/call2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
foo : meta.function-call.generic.python, meta.function-call.python, source.python
6-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
6+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
77
from : keyword.control.flow.python, meta.function-call.arguments.python, meta.function-call.python, source.python
88
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
99
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python

test/calls/call3.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
foo. : source.python
88
class : keyword.control.flow.python, meta.function-call.python, source.python
9-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
9+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
1010
a : meta.function-call.arguments.python, meta.function-call.python, source.python
1111
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
1212
foo. : source.python
1313
and : keyword.control.flow.python, meta.function-call.python, source.python
14-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
14+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
1515
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
1616
foo : source.python
1717
. : source.python

test/calls/call4.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1 : source.python
1010
: source.python
1111
foo : meta.function-call.generic.python, meta.function-call.python, source.python
12-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
12+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
1313
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
1414
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1515
baz : meta.function-call.arguments.python, meta.function-call.python, source.python

test/calls/print1.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* : keyword.operator.python, source.python
2222
2 : constant.numeric.dec.python, source.python
2323
print : meta.function-call.python, source.python, support.function.builtin.python
24-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
24+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
2525
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
2626
is : meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
2727
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
@@ -34,7 +34,7 @@
3434
print : source.python, support.function.builtin.python
3535
x, : source.python
3636
print : meta.function-call.python, source.python, support.function.builtin.python
37-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
37+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
3838
x : meta.function-call.arguments.python, meta.function-call.python, source.python
3939
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
4040
: meta.function-call.arguments.python, meta.function-call.python, source.python
@@ -46,7 +46,7 @@
4646
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
4747
print : source.python, support.function.builtin.python
4848
print : meta.function-call.python, source.python, support.function.builtin.python
49-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
49+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
5050
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
5151
print : source.python, support.function.builtin.python
5252
: source.python
@@ -56,7 +56,7 @@
5656
er : source.python, string.quoted.single.python
5757
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
5858
print : meta.function-call.python, source.python, support.function.builtin.python
59-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
59+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
6060
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
6161
er : meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
6262
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
@@ -68,13 +68,13 @@
6868
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
6969
print : meta.function-call.python, source.python, support.function.builtin.python
7070
: meta.function-call.python, source.python
71-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
71+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
7272
x : meta.function-call.arguments.python, meta.function-call.python, source.python
7373
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
7474
y : meta.function-call.arguments.python, meta.function-call.python, source.python
7575
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
7676
print : meta.function-call.python, source.python, support.function.builtin.python
77-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
77+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
7878
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.begin.python, source.python
7979
x, y : meta.function-call.arguments.python, meta.function-call.python, source.python
8080
) : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.end.python, source.python

test/classes/class10.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class : meta.class.python, source.python, storage.type.class.python
77
Foo : entity.name.type.class.python, meta.class.python, source.python
88
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
99
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, meta.function-call.python, source.python
10-
( : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
10+
( : meta.class.inheritance.python, meta.class.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
1111
q : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
1212
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1313
1 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python

test/classes/class11.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ def : meta.function.python, source.python, storage.type.function.pytho
4646
b : source.python
4747
: source.python
4848
print : meta.function-call.python, source.python, support.function.builtin.python
49-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
49+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
5050
self : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.language.special.self.python
5151
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
5252
: source.python
5353
self : meta.function-call.python, source.python, variable.language.special.self.python
54-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
54+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
5555
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
5656
a : source.python
5757
. : source.python
@@ -69,6 +69,6 @@ def : meta.function.python, source.python, storage.type.function.pytho
6969
2 : constant.numeric.dec.python, source.python
7070
: source.python
7171
self : meta.item-access.python, source.python, variable.language.special.self.python
72-
[ : meta.item-access.arguments.python, meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
72+
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
7373
123 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
7474
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python

test/classes/class12.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ def : meta.function.python, source.python, storage.type.function.pytho
5151
b : source.python
5252
: source.python
5353
print : meta.function-call.python, source.python, support.function.builtin.python
54-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
54+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
5555
cls : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.language.special.cls.python
5656
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
5757
: source.python
5858
cls : meta.function-call.python, source.python, variable.language.special.cls.python
59-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
59+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
6060
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
6161
: source.python
6262
cls : source.python, variable.language.special.cls.python
@@ -76,6 +76,6 @@ def : meta.function.python, source.python, storage.type.function.pytho
7676
__name__ : source.python, support.variable.magic.python
7777
: source.python
7878
cls : meta.item-access.python, source.python, variable.language.special.cls.python
79-
[ : meta.item-access.arguments.python, meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
79+
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
8080
123 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
8181
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python

test/expressions/const1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
self : source.python, variable.language.special.self.python
3434
. : source.python
3535
FOOO : meta.function-call.generic.python, meta.function-call.python, source.python
36-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
36+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
3737
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
3838
_ _1 __1 _1A __1A _a __a __ ___ ___a ___1 __aA ___Aa : source.python

test/expressions/expr10.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
: source.python
1111
... : constant.other.ellipsis.python, source.python
1212
a : meta.function-call.generic.python, meta.function-call.python, source.python
13-
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
13+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
1414
... : constant.other.ellipsis.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1515
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
1616
: meta.function-call.arguments.python, meta.function-call.python, source.python

test/expressions/expr11.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
self : source.python, variable.language.special.self.python
99
. : source.python
1010
some_list : meta.item-access.python, source.python
11-
[ : meta.item-access.arguments.python, meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
11+
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
1212
1 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
1313
: : meta.item-access.arguments.python, meta.item-access.python, source.python
1414
2 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python

test/expressions/expr12.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
print : meta.item-access.python, source.python, support.function.builtin.python
88
: meta.item-access.python, source.python
9-
[ : meta.item-access.arguments.python, meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
9+
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
1010
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python
1111
print : source.python, support.function.builtin.python
1212
: source.python

0 commit comments

Comments
 (0)