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
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
26 changes: 8 additions & 18 deletions Erlang/Erlang.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -579,17 +579,7 @@ contexts:
- - meta_content_scope: meta.field.identifier.erlang
- include: immediatelly-pop
- - include: variable-anonymous-pop
- match: '{{atom_unquoted}}'
scope: meta.atom.erlang entity.name.field.erlang
pop: true
- match: \'
scope: punctuation.definition.atom.begin.erlang
set:
- meta_include_prototype: false
- meta_scope: meta.atom.erlang entity.name.field.erlang
- include: atom-quoted-common
- include: macro-pop
- include: atom-expect-end
- include: variable-other-field
- include: else-pop

###[ PREPROCESSOR SPEC ]######################################################
Expand Down Expand Up @@ -1179,7 +1169,7 @@ contexts:
push: [record-fields, record-name, variable-other-record]
# records may look like normal variables in macro definitions
- match: '{{variable}}(?=\.{{ident}})'
scope: meta.record.identifier.erlang variable.other.erlang
scope: meta.record.identifier.erlang variable.other.readwrite.erlang
push: record-fields

record-name:
Expand All @@ -1188,13 +1178,13 @@ contexts:

variable-other-record:
- match: '{{atom_unquoted}}'
scope: meta.atom.erlang variable.other.record.erlang
scope: meta.atom.erlang storage.type.record.erlang
pop: true
- match: \'
scope: punctuation.definition.atom.begin.erlang
set:
- meta_include_prototype: false
- meta_scope: meta.atom.erlang variable.other.record.erlang
- meta_scope: meta.atom.erlang storage.type.record.erlang
- include: atom-quoted-common
- include: macro-pop
- include: atom-expect-end
Expand Down Expand Up @@ -1245,13 +1235,13 @@ contexts:

variable-other-field:
- match: '{{atom_unquoted}}'
scope: meta.atom.erlang variable.other.field.erlang
scope: meta.atom.erlang variable.other.member.erlang
pop: true
- match: \'
scope: punctuation.definition.atom.begin.erlang
set:
- meta_include_prototype: false
- meta_scope: meta.atom.erlang variable.other.field.erlang
- meta_scope: meta.atom.erlang variable.other.member.erlang
- include: atom-quoted-common
- include: macro-pop
- include: atom-expect-end
Expand Down Expand Up @@ -1448,11 +1438,11 @@ contexts:

variable-other:
- match: '{{variable}}'
scope: variable.other.erlang
scope: variable.other.readwrite.erlang

variable-other-pop:
- match: '{{variable}}'
scope: variable.other.erlang
scope: variable.other.readwrite.erlang
pop: true

variable-parameter:
Expand Down
Loading