Skip to content

Commit

Permalink
[Erlang] Rename mapping separator scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Mar 13, 2022
1 parent f8a5ded commit 0aea59b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
10 changes: 5 additions & 5 deletions Erlang/Erlang.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1173,14 +1173,14 @@ contexts:
- include: map-common
# value
- match: =>|\:=
scope: meta.mapping.erlang punctuation.separator.mapping.key-value.erlang
scope: meta.mapping.erlang punctuation.separator.key-value.erlang
push:
- meta_content_scope: meta.mapping.value.erlang
- include: expressions
- include: value-end-pop
# key
- match: ',?'
scope: meta.mapping.erlang punctuation.separator.mapping.pair.erlang
scope: meta.mapping.erlang punctuation.separator.sequence.erlang
push:
- meta_content_scope: meta.mapping.key.erlang
- match: (?==>|\:=)
Expand All @@ -1198,14 +1198,14 @@ contexts:
- include: map-common
# value
- match: =>|\:=
scope: meta.mapping.erlang punctuation.separator.mapping.key-value.erlang
scope: meta.mapping.erlang punctuation.separator.key-value.erlang
push:
- meta_content_scope: meta.mapping.value.erlang
- include: type-expressions
- include: value-end-pop
# key
- match: ',?'
scope: meta.mapping.erlang punctuation.separator.mapping.pair.erlang
scope: meta.mapping.erlang punctuation.separator.sequence.erlang
push:
- meta_content_scope: meta.mapping.key.erlang
- match: (?==>|\:=)
Expand All @@ -1216,7 +1216,7 @@ contexts:

map-separator:
- match: =>|\:=
scope: punctuation.separator.mapping.key-value.erlang
scope: punctuation.separator.key-value.erlang

map-common:
- match: \}
Expand Down
70 changes: 35 additions & 35 deletions Erlang/syntax_test_erlang.erl
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,25 @@ atom_tests() -> .
binary_tests() -> .

% Bit String tests

<< .
% ^^^ meta.sequence.binary.erlang
% ^^ punctuation.definition.sequence.begin.erlang
% ^^ punctuation.definition.sequence.begin.erlang
% ^ punctuation.terminator.clause.erlang - meta.sequence.binary

<< ;
% ^^^ meta.sequence.binary.erlang
% ^^ punctuation.definition.sequence.begin.erlang
% ^^ punctuation.definition.sequence.begin.erlang
% ^ punctuation.separator.clauses.erlang - meta.sequence.binary

<<A:8/.
% ^^^^^^ meta.sequence.binary.erlang
% ^^ punctuation.definition.sequence.begin.erlang
% ^^ punctuation.definition.sequence.begin.erlang
% ^ punctuation.terminator.clause.erlang - meta.sequence.binary

<<A:8/;
% ^^^^^^ meta.sequence.binary.erlang
% ^^ punctuation.definition.sequence.begin.erlang
% ^^ punctuation.definition.sequence.begin.erlang
% ^ punctuation.separator.clauses.erlang - meta.sequence.binary

<<10,20>>
Expand Down Expand Up @@ -511,8 +511,8 @@ map_tests() -> .
% ^ meta.mapping.erlang - meta.mapping.key.erlang - meta.mapping.value.erlang
% ^ - meta.mapping
% ^^ punctuation.section.mapping.begin.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.sequence.erlang
% ^ punctuation.separator.sequence.erlang
% ^ punctuation.section.mapping.end.erlang

Expr#{name=>"adam",{age,24}:=fct(),4.0=>{july,29},kay:=value}
Expand All @@ -538,32 +538,32 @@ map_tests() -> .
% ^^^^ variable.other.readwrite.erlang
% ^^ punctuation.section.mapping.begin.erlang
% ^^^^ constant.other.symbol.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^^^^^^ string.quoted.double.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.sequence.erlang
% ^ punctuation.section.sequence.begin.erlang
% ^^^ constant.other.symbol.erlang
% ^ punctuation.separator.sequence.erlang
% ^^ meta.number.integer.decimal.erlang constant.numeric.value.erlang
% ^ punctuation.section.sequence.end.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^^^ variable.function.erlang
% ^ punctuation.section.arguments.begin.erlang
% ^ punctuation.section.arguments.end.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.sequence.erlang
% ^^^ meta.number.float.decimal.erlang constant.numeric.value.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^ punctuation.section.sequence.begin.erlang
% ^^^^ constant.other.symbol.erlang
% ^ punctuation.separator.sequence.erlang
% ^^ meta.number.integer.decimal.erlang constant.numeric.value.erlang
% ^ punctuation.section.sequence.end.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.sequence.erlang
% ^^^ constant.other.symbol.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^^^^^ constant.other.symbol.erlang
% ^ punctuation.section.mapping.end.erlang
%
%

#{ name => "adam" , { age , 24 } => fct () , 4.0 := { july , 29 } }
% ^ - meta.mapping
Expand All @@ -583,21 +583,21 @@ map_tests() -> .
% ^ - meta.mapping
% ^^ punctuation.section.mapping.begin.erlang
% ^^^^ constant.other.symbol.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^^^^^^ string.quoted.double.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.sequence.erlang
% ^ punctuation.section.sequence.begin.erlang
% ^^^ constant.other.symbol.erlang
% ^ punctuation.separator.sequence.erlang
% ^^ meta.number.integer.decimal.erlang constant.numeric.value.erlang
% ^ punctuation.section.sequence.end.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^^^ variable.function.erlang
% ^ punctuation.section.arguments.begin.erlang
% ^ punctuation.section.arguments.end.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.sequence.erlang
% ^^^ meta.number.float.decimal.erlang constant.numeric.value.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^ punctuation.section.sequence.begin.erlang
% ^^^^ constant.other.symbol.erlang
% ^ punctuation.separator.sequence.erlang
Expand All @@ -617,15 +617,15 @@ map_tests() -> .
% ^ meta.mapping.key.erlang - meta.mapping.value.erlang - meta.mapping.erlang
% ^^ meta.mapping.erlang - meta.mapping.key.erlang - meta.mapping.value.erlang
% ^ meta.mapping.value.erlang - meta.mapping.key.erlang - meta.mapping.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
"adam"
% ^^^^^^^^ meta.mapping.value.erlang - meta.mapping.key.erlang - meta.mapping.erlang
% ^^^^^^ string.quoted.double.erlang
,
% ^ meta.mapping.value.erlang - meta.mapping.key.erlang - meta.mapping.erlang
% ^ meta.mapping.erlang - meta.mapping.key.erlang - meta.mapping.value.erlang
% ^ meta.mapping.key.erlang - meta.mapping.value.erlang - meta.mapping.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.sequence.erlang
{
% ^^^ meta.mapping.key.erlang - meta.mapping.value.erlang - meta.mapping.erlang
% ^ punctuation.section.sequence.begin.erlang
Expand All @@ -645,7 +645,7 @@ map_tests() -> .
% ^ meta.mapping.key.erlang - meta.mapping.value.erlang - meta.mapping.erlang
% ^^ meta.mapping.erlang - meta.mapping.key.erlang - meta.mapping.value.erlang
% ^ meta.mapping.value.erlang - meta.mapping.key.erlang - meta.mapping.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
fct ()
% ^^^^^^^^ meta.mapping.value.erlang - meta.mapping.key.erlang - meta.mapping.erlang
% ^^^ variable.function.erlang
Expand All @@ -655,15 +655,15 @@ map_tests() -> .
% ^ meta.mapping.value.erlang - meta.mapping.key.erlang - meta.mapping.erlang
% ^ meta.mapping.erlang - meta.mapping.key.erlang - meta.mapping.value.erlang
% ^ meta.mapping.key.erlang - meta.mapping.value.erlang - meta.mapping.erlang
% ^ punctuation.separator.mapping.pair.erlang
% ^ punctuation.separator.sequence.erlang
4.0
% ^^^^^ meta.mapping.key.erlang - meta.mapping.value.erlang - meta.mapping.erlang
% ^^^ meta.number.float.decimal.erlang constant.numeric.value.erlang
:=
% ^ meta.mapping.key.erlang - meta.mapping.value.erlang - meta.mapping.erlang
% ^^ meta.mapping.erlang - meta.mapping.key.erlang - meta.mapping.value.erlang
% ^ meta.mapping.value.erlang - meta.mapping.key.erlang - meta.mapping.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
{
% ^^^ meta.mapping.value.erlang - meta.mapping.key.erlang - meta.mapping.erlang
% ^ punctuation.section.sequence.begin.erlang
Expand Down Expand Up @@ -1156,12 +1156,12 @@ operator_tests() -> .

a := b
% ^ meta.atom.erlang constant.other.symbol.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^ meta.atom.erlang constant.other.symbol.erlang

a => b
% ^ meta.atom.erlang constant.other.symbol.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^ meta.atom.erlang constant.other.symbol.erlang

% directive-control-flow tests
Expand Down Expand Up @@ -1646,7 +1646,7 @@ preprocessor_define_tests() -> .
erlang:apply(Rec.mod, Func, Args ++ [Rec.mod_state])
% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.preprocessor.define.arguments.erlang
% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.arguments.erlang
% ^^^^^^^^^^^^^^^ meta.sequence.list.erlang
% ^^^^^^^^^^^^^^^ meta.sequence.list.erlang
% ^^^^^^ meta.path.erlang support.namespace.erlang
% ^ meta.path.erlang punctuation.accessor.double-colon.erlang
% ^^^^^ meta.path.erlang meta.function-call.identifier.erlang support.function.erlang
Expand Down Expand Up @@ -1692,7 +1692,7 @@ preprocessor_define_tests() -> .
% ^^ punctuation.separator.clause-head-body.erlang
% ^^^^^^^^^^ variable.other.readwrite.erlang
% ^^^ keyword.control.exception.end.erlang
%
%

% directive-export tests

Expand Down Expand Up @@ -2597,7 +2597,7 @@ preprocessor_spec_tests() -> .
%^^^^^ source.erlang meta.preprocessor.spec.erlang
% ^^^ source.erlang meta.preprocessor.spec.name.erlang
% ^^^ source.erlang meta.preprocessor.spec.parameters.erlang
% ^^ source.erlang meta.preprocessor.spec.erlang
% ^^ source.erlang meta.preprocessor.spec.erlang
% ^^^^^ source.erlang meta.preprocessor.spec.return-type.erlang
%^^^^ keyword.control.directive.spec.erlang
% ^^^ entity.name.function.erlang
Expand Down Expand Up @@ -2891,7 +2891,7 @@ preprocessor_type_tests() -> .
%^^^^ keyword.control.directive.type.erlang
% ^ punctuation.section.parameters.begin.erlang
% ^ punctuation.terminator.clause.erlang
% ^ invalid.illegal.stray.erlang - meta.preprocessor
% ^ invalid.illegal.stray.erlang - meta.preprocessor

-type (2.4).
% <- source.erlang meta.preprocessor.type.erlang punctuation.definition.keyword.erlang - keyword
Expand All @@ -2917,7 +2917,7 @@ preprocessor_type_tests() -> .
%^^^^ keyword.control.directive.type.erlang
% ^ invalid.illegal.unexpected-list.erlang
% ^ punctuation.terminator.clause.erlang
% ^ invalid.illegal.stray.erlang - meta.preprocessor
% ^ invalid.illegal.stray.erlang - meta.preprocessor

-type [1.].
% <- source.erlang meta.preprocessor.type.erlang punctuation.definition.keyword.erlang - keyword
Expand All @@ -2940,7 +2940,7 @@ preprocessor_type_tests() -> .
%^^^^ keyword.control.directive.type.erlang
% ^ invalid.illegal.unexpected-tuple.erlang
% ^ punctuation.terminator.clause.erlang
% ^ invalid.illegal.stray.erlang - meta.preprocessor
% ^ invalid.illegal.stray.erlang - meta.preprocessor
-type {2.4}.
% <- source.erlang meta.preprocessor.type.erlang punctuation.definition.keyword.erlang - keyword
%^^^^^^^^^^^ source.erlang meta.preprocessor.type.erlang
Expand Down Expand Up @@ -3110,7 +3110,7 @@ preprocessor_type_tests() -> .
% ^^^ support.type.erlang
% ^ punctuation.section.arguments.begin.erlang
% ^ punctuation.section.arguments.end.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^^^ variable.other.readwrite.erlang
% ^ punctuation.section.mapping.end.erlang
% ^ punctuation.terminator.clause.erlang
Expand All @@ -3134,7 +3134,7 @@ preprocessor_type_tests() -> .
% ^^ punctuation.separator.type-head-body.erlang
% ^^ punctuation.section.mapping.begin.erlang
% ^ variable.language.anonymous.erlang
% ^^ punctuation.separator.mapping.key-value.erlang
% ^^ punctuation.separator.key-value.erlang
% ^ variable.language.anonymous.erlang
% ^ punctuation.section.mapping.end.erlang
% ^ punctuation.terminator.clause.erlang
Expand Down

0 comments on commit 0aea59b

Please sign in to comment.