[erlang-bugs] erl_scan counts white space badly

Robert Virding rvirding@REDACTED
Mon Jan 25 18:00:21 CET 2010


2010/1/18 Hans Bolinder <hans.bolinder@REDACTED>:
> [Ulf Wiger:]
>> I tried the column tracking functionality of erl_scan:
> ...
>> The original source code wasn't misaligned, but the indentation
>> used a mix of tabs and spaces. erl_scan treats all kinds of
>> white space as one space.
>>
>> I think it would be reasonable to at the very least increment by
>> 8 if it's a tab. Supporting a tab length option might also be
>> possible, but then it would also be nice to have e.g. epp support
>> passing of this option to the scanner.
>
> We will consider adding such an option in a future release.

I would argue that it is not really the function of the scanner to do
this type of thing as there are too many different options if it is to
be supported properly. As the option 'return_white_spaces' exists it
can very well be left to the caller of erl_scan.

Robert


More information about the erlang-bugs mailing list