Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tokenize_code.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@
% any other operator:
else
symbol = skip(punctuation);
% ends with '...':
% The '...' has to be unskipped and handled here in order
% to not cause and error for line endings such as `+...`
% or `&&...`.
if length(symbol) > 3 && strcmp(symbol(end-2:end), '...')
pos = pos - 3;
symbol = symbol(1:end-3);
end
% one operator:
if any(strcmp(symbol, operators))
add_token('punctuation', symbol);
Expand Down