Skip to content

Commit eb64fe3

Browse files
committed
Change the scope name for a generic ':'.
punctuation.separator.block.begin.python -> punctuation.separator.colon.python This makes it possible to not complicate the grammar to treat annotations differently.
1 parent a605599 commit eb64fe3

File tree

22 files changed

+58
-31
lines changed

22 files changed

+58
-31
lines changed

grammars/MagicPython.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ repository:
560560
punctuation:
561561
patterns: [
562562
{
563-
name: "punctuation.separator.block.begin.python"
563+
name: "punctuation.separator.colon.python"
564564
match: ":"
565565
}
566566
{

grammars/MagicPython.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@
874874
<array>
875875
<dict>
876876
<key>name</key>
877-
<string>punctuation.separator.block.begin.python</string>
877+
<string>punctuation.separator.colon.python</string>
878878
<key>match</key>
879879
<string>:</string>
880880
</dict>

grammars/src/MagicPython.syntax.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ repository:
536536

537537
punctuation:
538538
patterns:
539-
- name: punctuation.separator.block.begin.python
539+
- name: punctuation.separator.colon.python
540540
match: ":"
541541
- name: punctuation.separator.element.python
542542
match: ","

misc/scopes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ punctuation.section.function.lambda.begin.python
114114
punctuation.separator.annotation.python
115115
punctuation.separator.annotation.result.python
116116
punctuation.separator.arguments.python
117-
punctuation.separator.block.begin.python
117+
punctuation.separator.colon.python
118118
punctuation.separator.continuation.line.python
119119
punctuation.separator.dict.python
120120
punctuation.separator.element.python

test/classes/class1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ class : source.python, storage.type.class.python
99
-> : invalid.illegal.annotation.python, source.python
1010
: source.python
1111
None : constant.language.python, source.python
12-
: : punctuation.separator.block.begin.python, source.python
12+
: : punctuation.separator.colon.python, source.python
1313
: source.python
1414
pass : keyword.control.flow.python, source.python

test/classes/super1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def : meta.function.python, source.python, storage.type.function.pytho
8787
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
8888
: source.python
8989
if : keyword.control.flow.python, source.python
90-
: : punctuation.separator.block.begin.python, source.python
90+
: : punctuation.separator.colon.python, source.python
9191
: source.python
9292
__init__ : meta.function-call.python, source.python, support.function.magic.python
9393
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python

test/comments/typing5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
: meta.function-call.arguments.python, meta.function-call.python, source.python
1313
TypeVar : meta.function-call.arguments.python, meta.function-call.python, source.python
1414
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
15-
: : punctuation.separator.block.begin.python, source.python
15+
: : punctuation.separator.colon.python, source.python
1616
: source.python
1717
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
1818
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python

test/docstrings/mix1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def : meta.function.python, source.python, storage.type.function.pytho
6767
with : keyword.control.flow.python, source.python
6868
: source.python
6969
bar : source.python
70-
: : punctuation.separator.block.begin.python, source.python
70+
: : punctuation.separator.colon.python, source.python
7171
: source.python
7272
pass : keyword.control.flow.python, source.python
7373
: source.python
@@ -105,6 +105,6 @@ def : meta.function.python, source.python, storage.type.function.pytho
105105
with : keyword.control.flow.python, source.python
106106
: source.python
107107
bar : source.python
108-
: : punctuation.separator.block.begin.python, source.python
108+
: : punctuation.separator.colon.python, source.python
109109
: source.python
110110
pass : keyword.control.flow.python, source.python

test/docstrings/mix2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def : meta.function.python, source.python, storage.type.function.pytho
6666
with : keyword.control.flow.python, source.python
6767
: source.python
6868
bar : source.python
69-
: : punctuation.separator.block.begin.python, source.python
69+
: : punctuation.separator.colon.python, source.python
7070
: source.python
7171
pass : keyword.control.flow.python, source.python
7272
: source.python
@@ -104,6 +104,6 @@ def : meta.function.python, source.python, storage.type.function.pytho
104104
with : keyword.control.flow.python, source.python
105105
: source.python
106106
bar : source.python
107-
: : punctuation.separator.block.begin.python, source.python
107+
: : punctuation.separator.colon.python, source.python
108108
: source.python
109109
pass : keyword.control.flow.python, source.python

test/fstrings/nested1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def : keyword.control.flow.python, meta.fstring.python, meta.function-
5252
aaa : meta.fstring.python, meta.function-call.arguments.python, meta.function-call.generic.python, meta.function-call.python, source.python
5353
( : meta.fstring.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
5454
) : meta.fstring.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
55-
: : meta.fstring.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.block.begin.python, source.python
55+
: : meta.fstring.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.colon.python, source.python
5656
: meta.fstring.python, meta.function-call.arguments.python, meta.function-call.python, source.python
5757
pass : keyword.control.flow.python, meta.fstring.python, meta.function-call.arguments.python, meta.function-call.python, source.python
5858
} : constant.character.format.placeholder.other.python, meta.fstring.python, meta.function-call.arguments.python, meta.function-call.python, source.python

0 commit comments

Comments
 (0)