@@ -211,6 +211,14 @@ tokenize("..." ++ Rest, Line, Scope, Tokens) ->
211
211
tokenize (Rest , Line , Scope , [Token |Tokens ]);
212
212
213
213
% ## 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
+
214
222
tokenize (" .<<>>" ++ Rest , Line , Scope , Tokens ) ->
215
223
handle_call_identifier (Rest , Line , '<<>>' , Scope , Tokens );
216
224
@@ -232,13 +240,8 @@ tokenize([$.,T|Rest], Line, Scope, Tokens) when ?comp1(T); ?op1(T); T == $& ->
232
240
% Dot call
233
241
234
242
% ## 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 ));
242
245
243
246
tokenize ([$. ,H |T ], Line , # scope {file = File } = Scope , Tokens ) when ? is_quote (H ) ->
244
247
case elixir_interpolation :extract (Line , File , true , T , H ) of
0 commit comments