Why is column information stripped from elixir's AST?

Everyone is confusing leex and yecc. :slight_smile:

Leex is a tokenizer and it doesn’t produce column information but Elixir doesn’t use leex. We have a hand written tokenizer.

Elixir does use Yecc which is a parser. Yecc doesn’t care about column information and we could add column information to the AST.

The reason we don’t pass the column information forward is because when we started, Erlang did not use the column information. However Erlang does use it today, so I don’t see any reason for not doing that now.

We just need to be careful with constructs such as quote, as the column information will be out of place, but for everything else it should be fine.

5 Likes