@@ -211,6 +211,14 @@ tokenize("..." ++ Rest, Line, Scope, Tokens) ->
211211 tokenize (Rest , Line , Scope , [Token |Tokens ]);
212212
213213% ## Containers
214+
215+ tokenize ([$. ,T |Tail ], Line , Scope , Tokens ) when ? is_space (T ) ->
216+ case [T |Tail ] of
217+ [$\r ,$\n |Rest ] -> tokenize ([$. |Rest ], Line + 1 , Scope , Tokens );
218+ [$\n |Rest ] -> tokenize ([$. |Rest ], Line + 1 , Scope , Tokens );
219+ [_ |Rest ] -> tokenize ([$. |Rest ], Line , Scope , Tokens )
220+ end ;
221+
214222tokenize (" .<<>>" ++ Rest , Line , Scope , Tokens ) ->
215223 handle_call_identifier (Rest , Line , '<<>>' , Scope , Tokens );
216224
@@ -232,13 +240,8 @@ tokenize([$.,T|Rest], Line, Scope, Tokens) when ?comp1(T); ?op1(T); T == $& ->
232240% Dot call
233241
234242% ## Exception for .( as it needs to be treated specially in the parser
235- tokenize ([$. ,T1 ,T2 |T ], Line , Scope , Tokens ) when T1 == $( ; (T1 == $\s andalso T2 == $( ) ->
236- Rest = case T1 of
237- $( -> [T1 ,T2 |T ];
238- % Ignores the space
239- $\s -> [T2 |T ]
240- end ,
241- tokenize (Rest , Line , Scope , add_token_with_nl ({ dot_call_op , Line , '.' }, Tokens ));
243+ tokenize ([$. ,$( |Rest ], Line , Scope , Tokens ) ->
244+ tokenize ([$( |Rest ], Line , Scope , add_token_with_nl ({ dot_call_op , Line , '.' }, Tokens ));
242245
243246tokenize ([$. ,H |T ], Line , # scope {file = File } = Scope , Tokens ) when ? is_quote (H ) ->
244247 case elixir_interpolation :extract (Line , File , true , T , H ) of
0 commit comments