Skip to content
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

[Erlang] Tweak some scopes #2426

Merged
merged 4 commits into from
Jul 22, 2020
Merged

Conversation

deathaxe
Copy link
Collaborator

Fixes #2372

This PR proposes few scope changes which attempt to help color schemes to better highlight/distinguish the different types of entities used in Erlang.

deathaxe added 4 commits July 21, 2020 21:16
In Java, field declarations are scoped as variable.other.member as well.
The `readwrite` should make clear variables beginning with capital
letters are meant for reading and writing values, while lower case atoms
are constants.
The #record{field=value} term represents an instantiation of a record,
which was declared by `-record(record, {field=value})` statement. Thus
the #record identifier can be interpreted as storage.type.

This commit uses `storage.type.record` instead of `storage.type.struct`
as this scope name is used for the meta scopes as well.
@wbond wbond merged commit 56a2f9d into sublimehq:master Jul 22, 2020
@deathaxe deathaxe deleted the pr/erlang/tweak-scopes branch July 22, 2020 17:52
mitranim pushed a commit to mitranim/Packages that referenced this pull request Mar 25, 2022
* [Erlang] Rename variable.other.field to variable.other.member

* [Erlang] Rename entity.name.field to variable.other.member

In Java, field declarations are scoped as variable.other.member as well.

* [Erlang] Rename variables to variable.other.readwrite

The `readwrite` should make clear variables beginning with capital
letters are meant for reading and writing values, while lower case atoms
are constants.

* [Erlang] Use storage.type.record

The #record{field=value} term represents an instantiation of a record,
which was declared by `-record(record, {field=value})` statement. Thus
the #record identifier can be interpreted as storage.type.

This commit uses `storage.type.record` instead of `storage.type.struct`
as this scope name is used for the meta scopes as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Erlang] Variables, modules, record names and fields are indistinguishable
3 participants