@@ -2299,18 +2299,38 @@ contexts:
2299
2299
scope: constant.other.keyword.elixir
2300
2300
captures:
2301
2301
1: punctuation.definition.constant.end.elixir
2302
- # Look for ':' behind the closing double/single quote.
2303
- - match : (?x)(?=(["']) (?>\\. | (?!\1).)* \1:{{no_colon_suffix}})
2304
- comment : keyword string
2305
- push :
2306
- - match : (.)
2307
- scope : punctuation.definition.constant.begin.elixir
2308
- set :
2309
- - meta_scope : meta.string.elixir constant.other.keyword.elixir
2310
- - include : escaped_or_interpolated
2311
- - match : ' \1:'
2312
- scope : punctuation.definition.constant.end.elixir
2313
- pop : 1
2302
+ # FIXME: this doesn't quite work. It shouldn't be necessary to have two branches...
2303
+ - match : (?=(["'])(?!\1\1))
2304
+ branch_point : string_atom_keyword_branch
2305
+ branch : [string_atom_keyword_pop, fail_string_atom_keyword_branch]
2306
+
2307
+ fail_string_atom_keyword_branch :
2308
+ # - include: string
2309
+ # - include: if_empty_pop
2310
+ - match : ' '
2311
+ fail : string_atom_keyword_branch
2312
+
2313
+ string_atom_keyword_pop :
2314
+ - match : \"
2315
+ scope : punctuation.definition.constant.begin.elixir
2316
+ set :
2317
+ - meta_scope : meta.string.elixir constant.other.keyword.elixir
2318
+ - include : escaped_or_interpolated
2319
+ - match : \":{{no_colon_suffix}}
2320
+ scope : punctuation.definition.constant.end.elixir
2321
+ pop : 1
2322
+ - match : \"
2323
+ fail : string_atom_keyword_branch
2324
+ - match : \'
2325
+ scope : punctuation.definition.constant.begin.elixir
2326
+ set :
2327
+ - meta_scope : meta.string.elixir constant.other.keyword.elixir
2328
+ - include : escaped_or_interpolated
2329
+ - match : \':{{no_colon_suffix}}
2330
+ scope : punctuation.definition.constant.end.elixir
2331
+ pop : 1
2332
+ - match : \'
2333
+ fail : string_atom_keyword_branch
2314
2334
2315
2335
atom_symbol :
2316
2336
- match : :(?!:(?!:))
0 commit comments