Skip to content

Commit a864c2d

Browse files
committed
fix keyword detection in list comprehension
close #109
1 parent 284f5ea commit a864c2d

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Julia.sublime-syntax

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,15 +1078,6 @@ contexts:
10781078
- match: \s*(:)
10791079
captures:
10801080
1 : keyword.operator.colon.julia
1081-
push:
1082-
- match: \s*(?={{symb_id}})
1083-
push:
1084-
- include: function-call-or-inline-declaration
1085-
- include: identifiers
1086-
- match: ''
1087-
pop: true
1088-
- match: ''
1089-
pop: true
10901081
- match: (\.)?(?=\()
10911082
captures:
10921083
1: keyword.operator.broadcast.julia

syntax_test_julia.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,17 @@ end
680680
# ^^ meta.sequence.julia keyword.control.julia
681681
#
682682

683+
[x for x in 1:10 if x < 5]
684+
# ^ keyword.operator.colon.julia
685+
# ^^ keyword.control.julia
686+
[x for x in 1:f(10) if x < 5]
687+
# ^ keyword.operator.colon.julia
688+
# ^ meta.function-call.julia variable.function.julia meta.generic-name.julia
689+
# ^^ keyword.control.julia
690+
[x for x in 1:@f(10) if x < 5]
691+
# ^ keyword.operator.colon.julia
692+
# ^^ meta.function-call.macro.julia
693+
# ^^ keyword.control.julia
683694

684695
# Issues
685696

0 commit comments

Comments
 (0)