Skip to content

Commit deed147

Browse files
committed
Support special '0' Alex startcode
1 parent b6c6446 commit deed147

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

syntaxes/alex.YAML-tmLanguage

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ repository:
2323
- include: "#block_comment"
2424
startcode:
2525
patterns:
26+
- name: variable.other.startcode.0.alex
27+
match: '0'
2628
- name: variable.other.startcode.alex
2729
match: ([\p{Ll}\p{Lu}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}\.']*)
2830
- name: punctuation.comma.startcode.alex

test/tests/Alex.x

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ tokens :-
3838
-- ^ punctuation.block.end.alex
3939
<0,1> $alpha+ { IDENT }
4040
--^ punctuation.comma.startcode.alex
41-
<foo,bar, baz , qu_ux > {
41+
<foo,bar, baz ,0,qu_ux > {
4242
-- <------------------------ meta.block.startcode.alex
4343
-- <- punctuation.bracket.startcode.alex
44-
-- ^^^ ^^^ ^^^^^ variable.other.startcode.alex
45-
-- ^ punctuation.bracket.startcode.alex
46-
-- ^ punctuation.block.startcode.begin.alex
44+
-- ^ variable.other.startcode.0.alex
45+
-- ^^^ ^^^ ^^^^^ variable.other.startcode.alex
46+
-- ^ punctuation.bracket.startcode.alex
47+
-- ^ punctuation.block.startcode.begin.alex
4748
\n ;
4849
-- ^ punctuation.semicolon.alex
4950
@foobar { FOO }

0 commit comments

Comments
 (0)