Skip to content

Commit

Permalink
[Erlang] Use detailed scope for true/false
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Jul 13, 2024
1 parent 32d0c65 commit 88ad1ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Erlang/Erlang.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1386,8 +1386,10 @@ contexts:

constant:
# https://www.erlang.org/doc/reference_manual/data_types.html#boolean
- match: (false|true){{ident_break}}
scope: constant.language.boolean.erlang
- match: false{{ident_break}}
scope: constant.language.boolean.false.erlang
- match: true{{ident_break}}
scope: constant.language.boolean.true.erlang
# https://www.erlang.org/doc/reference_manual/errors.html#exceptions
- match: (error|exit|ok|throw){{ident_break}}
scope: constant.language.exception.type.erlang
Expand Down
4 changes: 2 additions & 2 deletions Erlang/syntax_test_erlang.erl
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ atom_tests() -> .
% Special atom tests

true
% ^^^^ constant.language.boolean.erlang
% ^^^^ constant.language.boolean.true.erlang

false
% ^^^^^ constant.language.boolean.erlang
% ^^^^^ constant.language.boolean.false.erlang

error
% ^^^^^ constant.language.exception.type.erlang
Expand Down

0 comments on commit 88ad1ca

Please sign in to comment.