-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Refactor Eex Tokenizer #11666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Eex Tokenizer #11666
Conversation
Looks great to me, we just need to get CI green! :) |
Ah, don't forget to update the docs at the top of EEx.Tokenizer. :) |
Yeah. I'm trying to debug what I'm missing here to make it green. Also, we are going to expose |
We will expose EEx.tokenize(contents, opts), yes! |
This commit moves the line and column to the last argument to be handled as a metadata as you can see in the example below: ```elixir assert T.tokenize('foo', 1, 1, @opts) == {:ok, [{:text, 'foo', %{line: 1, column: 1}}, {:eof, %{line: 1, column: 4}}]} ``` This also expose Eex.tokenize/2 which takes line and column as options.
f38a617
to
b032662
Compare
@josevalim I've updated the docs and exposed |
@feliperenan can you also please change the tokenizer errors to be of the shape |
@josevalim Done!. Let me know if there is something else 🙌🏻 |
💚 💙 💜 💛 ❤️ |
This commit moves the line and column to the last argument to be handled as a metadata as you can see in the example below: