@@ -2398,18 +2398,38 @@ contexts:
2398
2398
scope: constant.other.keyword.elixir
2399
2399
captures:
2400
2400
1: punctuation.definition.constant.end.elixir
2401
- # Look for ':' behind the closing double/single quote.
2402
- - match : (?x)(?=(["']) (?>\\. | (?!\1).)* \1:{{no_colon_suffix}})
2403
- comment : keyword string
2404
- push :
2405
- - match : (.)
2406
- scope : punctuation.definition.constant.begin.elixir
2407
- set :
2408
- - meta_scope : meta.string.elixir constant.other.keyword.elixir
2409
- - include : escaped_or_interpolated
2410
- - match : ' \1:'
2411
- scope : punctuation.definition.constant.end.elixir
2412
- pop : 1
2401
+ # FIXME: this doesn't quite work. It shouldn't be necessary to have two branches...
2402
+ - match : (?=(["'])(?!\1\1))
2403
+ branch_point : string_atom_keyword_branch
2404
+ branch : [string_atom_keyword_pop, fail_string_atom_keyword_branch]
2405
+
2406
+ fail_string_atom_keyword_branch :
2407
+ # - include: string
2408
+ # - include: if_empty_pop
2409
+ - match : ' '
2410
+ fail : string_atom_keyword_branch
2411
+
2412
+ string_atom_keyword_pop :
2413
+ - match : \"
2414
+ scope : punctuation.definition.constant.begin.elixir
2415
+ set :
2416
+ - meta_scope : meta.string.elixir constant.other.keyword.elixir
2417
+ - include : escaped_or_interpolated
2418
+ - match : \":{{no_colon_suffix}}
2419
+ scope : punctuation.definition.constant.end.elixir
2420
+ pop : 1
2421
+ - match : \"
2422
+ fail : string_atom_keyword_branch
2423
+ - match : \'
2424
+ scope : punctuation.definition.constant.begin.elixir
2425
+ set :
2426
+ - meta_scope : meta.string.elixir constant.other.keyword.elixir
2427
+ - include : escaped_or_interpolated
2428
+ - match : \':{{no_colon_suffix}}
2429
+ scope : punctuation.definition.constant.end.elixir
2430
+ pop : 1
2431
+ - match : \'
2432
+ fail : string_atom_keyword_branch
2413
2433
2414
2434
atom_symbol :
2415
2435
- match : :(?!:(?!:))
0 commit comments