Skip to content

Add a meta.member.access.python scope. #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions grammars/MagicPython.cson
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ repository:
}
]
"member-access":
name: "meta.member.access.python"
begin: "(\\.)\\s*(?!\\.)"
end: '''
(?x)
Expand Down Expand Up @@ -1167,6 +1168,7 @@ repository:
"1":
name: "entity.other.inherited-class.python"
"member-access-class":
name: "meta.member.access.python"
begin: "(\\.)\\s*(?!\\.)"
end: "(?<=\\S)(?=\\W)|$"
beginCaptures:
Expand Down
4 changes: 4 additions & 0 deletions grammars/MagicPython.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,8 @@ it's probably control flow like:
</dict>
<key>member-access</key>
<dict>
<key>name</key>
<string>meta.member.access.python</string>
<key>begin</key>
<string>(\.)\s*(?!\.)</string>
<key>end</key>
Expand Down Expand Up @@ -1796,6 +1798,8 @@ it's probably control flow like:
</dict>
<key>member-access-class</key>
<dict>
<key>name</key>
<string>meta.member.access.python</string>
<key>begin</key>
<string>(\.)\s*(?!\.)</string>
<key>end</key>
Expand Down
2 changes: 2 additions & 0 deletions grammars/src/MagicPython.syntax.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ repository:
match: (?x) \b ([[:alpha:]_]\w*) \b

member-access:
name: meta.member.access.python
begin: (\.)\s*(?!\.)
end: |
(?x)
Expand Down Expand Up @@ -947,6 +948,7 @@ repository:
'1': {name: entity.other.inherited-class.python}

member-access-class:
name: meta.member.access.python
begin: (\.)\s*(?!\.)
end: (?<=\S)(?=\W)|$
beginCaptures:
Expand Down
1 change: 1 addition & 0 deletions misc/scopes
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ meta.function.parameters.python
meta.function.python
meta.item-access.python
meta.lambda-function.python
meta.member.access.python
meta.named.regexp
meta.typehint.comment.python
punctuation.character.set.begin.regexp
Expand Down
1,036 changes: 518 additions & 518 deletions test/atom-spec/python-spec.js

Large diffs are not rendered by default.

156 changes: 78 additions & 78 deletions test/builtins/builtins3.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,127 +60,127 @@
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
] : punctuation.definition.list.end.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
__bases__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__bases__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__class__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__class__ : meta.member.access.python, source.python, support.variable.magic.python
assert : keyword.control.flow.python, source.python
: source.python
__debug__ : source.python, support.variable.magic.python
__builtins__ : source.python, support.variable.magic.python
__builtins__ : source.python, support.variable.magic.python
. : punctuation.separator.period.python, source.python
len : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
len : meta.member.access.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
__builtins__ : meta.function-call.arguments.python, meta.function-call.python, source.python, support.variable.magic.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
__dict__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__dict__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__doc__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__doc__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__file__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__file__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__members__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__members__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__metaclass__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__metaclass__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__methods__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__methods__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__module__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__module__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__mro__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__mro__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__name__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__name__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__slots__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__slots__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__subclasses__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__subclasses__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__version__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__version__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__weakref__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__weakref__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__qualname__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__qualname__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__code__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__code__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__wrapped__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__wrapped__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__signature__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__signature__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__defaults__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__defaults__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__func__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__func__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__self__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__self__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__kwdefaults__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__kwdefaults__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__matmul__ : source.python, support.function.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__matmul__ : meta.member.access.python, source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__imatmul__ : source.python, support.function.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__imatmul__ : meta.member.access.python, source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__rmatmul__ : source.python, support.function.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__rmatmul__ : meta.member.access.python, source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__annotations__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__annotations__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__init_subclass__ : source.python, support.function.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__init_subclass__ : meta.member.access.python, source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__set_name__ : source.python, support.function.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__set_name__ : meta.member.access.python, source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__fspath__ : source.python, support.function.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__fspath__ : meta.member.access.python, source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__classcell__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__classcell__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__bytes__ : source.python, support.function.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__bytes__ : meta.member.access.python, source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__spec__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__spec__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__path__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__path__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__prepare__ : source.python, support.function.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__prepare__ : meta.member.access.python, source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__package__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__package__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__traceback__ : source.python, support.variable.magic.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__traceback__ : meta.member.access.python, source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__notspecial__ : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
__notspecial__ : meta.member.access.python, source.python
25 changes: 13 additions & 12 deletions test/builtins/builtins4.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@




some : source.python
. : punctuation.separator.period.python, source.python
int : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
int : meta.member.access.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
sum : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
sum : meta.member.access.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
super : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
super : meta.member.access.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
unicode : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
unicode : meta.member.access.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
foo : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
foo : meta.member.access.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
Exception : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
Exception : meta.member.access.python, source.python
27 changes: 14 additions & 13 deletions test/builtins/builtins5.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@




some : source.python
. : punctuation.separator.period.python, source.python
: source.python
True : keyword.illegal.name.python, source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
: meta.member.access.python, source.python
True : keyword.illegal.name.python, meta.member.access.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
: source.python
True : keyword.illegal.name.python, source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
: meta.member.access.python, source.python
\ : meta.member.access.python, punctuation.separator.continuation.line.python, source.python
: meta.member.access.python, source.python
: meta.member.access.python, source.python
True : keyword.illegal.name.python, meta.member.access.python, source.python
True : constant.language.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
: source.python
: source.python
True : keyword.illegal.name.python, source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
: meta.member.access.python, source.python
: meta.member.access.python, source.python
True : keyword.illegal.name.python, meta.member.access.python, source.python
Loading