Skip to content

Commit 65a52a5

Browse files
azizkprincemaple
authored andcommitted
Elixir: added iex_dots context; allow EEx tags inside comments.
1 parent c4bf96c commit 65a52a5

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

syntaxes/Elixir.sublime-syntax

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,7 @@ contexts:
6464
prototype:
6565
# NB: rules in the prototype context will always match before any other.
6666
- include: merge_conflict # Merge conflict markers can occur anywhere.
67-
- match: ^(\s*)(\.{3})(?:\((.*?)\))?(>)
68-
comment: iex prompt continuation
69-
captures:
70-
1: meta.string.elixir
71-
2: keyword.other.iex-dots.elixir
72-
3: constant.other.elixir
73-
4: keyword.other.iex-angle.elixir punctuation.definition.iex.begin.elixir
67+
- include: iex_dots # iex prompt continuation: ...>
7468

7569
core_syntax:
7670
# The rules are approximately ordered by their likeliness of occurrence
@@ -1910,6 +1904,15 @@ contexts:
19101904
pop: true
19111905
- include: core_syntax
19121906

1907+
iex_dots:
1908+
- match: ^(\s*)(\.{3})(?:\((.*?)\))?(>)
1909+
comment: iex prompt continuation
1910+
captures:
1911+
1: meta.string.elixir
1912+
2: keyword.other.iex-dots.elixir
1913+
3: constant.other.elixir
1914+
4: keyword.other.iex-angle.elixir punctuation.definition.iex.begin.elixir
1915+
19131916
comma_and_skip_ws:
19141917
- include: invalid_comma
19151918
- match: \,
@@ -2322,10 +2325,12 @@ contexts:
23222325

23232326
comment:
23242327
# - include: opaque_struct
2325-
- match: (#).*\n?
2326-
scope: comment.line.number-sign.elixir
2327-
captures:
2328-
1: punctuation.definition.comment.elixir
2328+
- match: \#
2329+
scope: punctuation.definition.comment.elixir
2330+
push:
2331+
- meta_scope: comment.line.number-sign.elixir
2332+
- match: \n
2333+
pop: true
23292334

23302335
comments:
23312336
- match: (?=#)

0 commit comments

Comments
 (0)