@@ -357,17 +357,9 @@ contexts:
357
357
scope : punctuation.accessor.dot.elixir
358
358
set :
359
359
- include : arguments_paren_param_pop
360
- - include : atom_keyword
361
360
- include : module_function_call_param_pop
362
- - include : unquote_call_pop
363
361
- include : id_or_operator_call_param_pop
364
- - include : id_member_pop
365
- - include : module_name_pop
366
- - include : arguments_pop
367
- - include : quoted_remote_call_pop
368
- - include : quoted_member_pop
369
- - include : tuple_call_pop
370
- - include : if_non_space_or_eol_pop
362
+ - include : member_or_call_pop
371
363
372
364
function_call_param :
373
365
- match : (?=\.(?!\.))
@@ -1786,38 +1778,31 @@ contexts:
1786
1778
module_name :
1787
1779
- match : ' {{module_name}}{{no_key_suffix}}'
1788
1780
scope : constant.other.module.elixir
1789
- - match : (?x)(:(["'])) ((?>\\\\|\\\2|(?!\2).)*?) (\2) (?=\s*\.(?!\.))
1790
- captures :
1791
- 1 : punctuation.definition.constant.begin.elixir
1792
- 3 : constant.other.module.elixir
1793
- 4 : punctuation.definition.constant.end.elixir
1794
- - match : (:)({{atom_symbol}})(?=\s*\.(?!\.))
1795
- captures :
1796
- 1 : punctuation.definition.constant.begin.elixir
1797
- 2 : constant.other.module.elixir
1781
+ - include : atom_module_name
1782
+
1798
1783
module_name_pop :
1799
1784
- match : ' {{module_name}}{{no_key_suffix}}'
1800
1785
scope : constant.other.module.elixir
1801
1786
pop : 1
1802
1787
1803
1788
module_function_call_pop :
1804
- - match : ({{module_name}})\s*( \.(?!\.))
1789
+ - match : ({{module_name}})(?= \s*\.(?!\.))
1805
1790
comment : always a function call after a module
1806
- captures :
1807
- 1 : constant.other.module.elixir
1808
- 2 : punctuation.accessor.dot.elixir
1809
- set : member_call_pop
1791
+ scope : constant.other.module.elixir
1792
+ set : module_member_pop
1810
1793
1811
- member_call_pop :
1812
- # - include: sql_or_fragment
1813
- - include : quoted_remote_call_pop
1814
- - include : quoted_member_pop
1815
- - include : unquote_call_pop
1816
- - match : ' {{member}}'
1817
- scope : variable.function.elixir
1818
- set : arguments_or_pop
1819
- - include : tuple_call_pop
1820
- - include : if_non_space_or_eol_pop
1794
+ module_member_pop :
1795
+ - match : \.(?!\.)
1796
+ scope : punctuation.accessor.dot.elixir
1797
+ set :
1798
+ - match : ' {{member}}'
1799
+ comment : always a function after module name
1800
+ scope : variable.function.elixir
1801
+ set : arguments_or_pop
1802
+ - match : (?=\()
1803
+ comment : no ".()" style arguments after module name
1804
+ pop : 1
1805
+ - include : member_or_call_pop
1821
1806
1822
1807
id_or_operator_call_pop :
1823
1808
- match : ({{member}})(?=\s*\.\s*\(|{{has_arguments}})
@@ -1872,19 +1857,32 @@ contexts:
1872
1857
captures :
1873
1858
1 : constant.character.escape.char.elixir
1874
1859
1875
- modules_or_ids_or_calls :
1860
+ atom_module_name :
1876
1861
- match : (?x)(:(["'])) ((?>\\\\|\\\2|(?!\2).)*?) (\2) (?=\s*\.(?!\.))
1877
1862
captures :
1878
1863
1 : punctuation.definition.constant.begin.elixir
1879
1864
3 : constant.other.module.elixir
1880
1865
4 : punctuation.definition.constant.end.elixir
1881
- push : member_call_pop
1882
- - match : (:)({{atom_symbol}})\s*(\.(?!\.))
1866
+ - match : (:)({{atom_symbol}})(?=\s*\.(?!\.))
1883
1867
captures :
1884
1868
1 : punctuation.definition.constant.begin.elixir
1885
1869
2 : constant.other.module.elixir
1886
- 3 : punctuation.accessor.dot.elixir
1887
- push : member_call_pop
1870
+
1871
+ atom_module_name_call :
1872
+ - match : (?x)(:(["'])) ((?>\\\\|\\\2|(?!\2).)*?) (\2) (?=\s*\.(?!\.))
1873
+ captures :
1874
+ 1 : punctuation.definition.constant.begin.elixir
1875
+ 3 : constant.other.module.elixir
1876
+ 4 : punctuation.definition.constant.end.elixir
1877
+ push : module_member_pop
1878
+ - match : (:)({{atom_symbol}})(?=\s*\.(?!\.))
1879
+ captures :
1880
+ 1 : punctuation.definition.constant.begin.elixir
1881
+ 2 : constant.other.module.elixir
1882
+ push : module_member_pop
1883
+
1884
+ modules_or_ids_or_calls :
1885
+ - include : atom_module_name_call
1888
1886
- match : (?={{module_name}}|{{identifier}})
1889
1887
push :
1890
1888
- include : module_function_call_pop
@@ -1916,18 +1914,19 @@ contexts:
1916
1914
dot_accessor :
1917
1915
- match : \.(?!\.)
1918
1916
scope : punctuation.accessor.dot.elixir
1919
- push :
1920
- - include : atom_keyword
1921
- - include : module_function_call_pop
1922
- - include : unquote_call_pop
1923
- - include : id_or_operator_call_pop
1924
- - include : id_member_pop
1925
- - include : module_name_pop
1926
- - include : arguments_pop
1927
- - include : quoted_remote_call_pop
1928
- - include : quoted_member_pop
1929
- - include : tuple_call_pop
1930
- - include : if_non_space_or_eol_pop
1917
+ push : member_or_call_pop
1918
+
1919
+ member_or_call_pop :
1920
+ - include : module_function_call_pop
1921
+ - include : unquote_call_pop
1922
+ - include : id_or_operator_call_pop
1923
+ - include : id_member_pop
1924
+ - include : module_name_pop
1925
+ - include : arguments_pop
1926
+ - include : quoted_remote_call_pop
1927
+ - include : quoted_member_pop
1928
+ - include : tuple_call_pop
1929
+ - include : if_non_space_or_eol_pop
1931
1930
1932
1931
# # Module attributes
1933
1932
@@ -2339,16 +2338,11 @@ contexts:
2339
2338
- match : (?=\.(?!\.))
2340
2339
set :
2341
2340
- include : dot_operator
2342
- - include : arguments_pop
2343
2341
- include : capture_name_pop
2344
- - include : id_or_operator_call_pop
2345
- - include : quoted_remote_call_pop
2346
- - include : quoted_member_pop
2347
2342
- match : (?={{member}}{{no_id_key_suffix}})
2348
2343
push : id_member_pop
2349
- - include : tuple_call_pop
2350
2344
- include : if_closing_token_pop
2351
- - include : if_non_space_or_eol_pop
2345
+ - include : member_or_call_pop
2352
2346
- include : capture_name_pop
2353
2347
- include : special_form
2354
2348
- match : (?={{identifier}}\s*\.(?!\.|\s*\())
0 commit comments