Tokenize.jl
Tokenize.jl copied to clipboard
Tokenization for Julia source code
Since recently, ``tokenize`` fails on a file containing double quotes. Example ``` using Tokenize # Create test file open("test.txt", "w") do out print(out, "f(\"data\")") end # Display test file open("test.txt")...
I did not add a badge ([![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaLang.github.io/Tokenize.jl/dev)) to the README since there isn't much documentation yet. But with this scaffolding in place, it will be easier to add some documentation...
```julia using Tokenize collect(tokenize("0x.")) ```
https://github.com/JuliaLang/julia/issues/16356#issuecomment-312267173 Cc @ZacLN
Important that all branches are covered since we do some "ugly" coding for performance reasons.
It is unnecessary for all tokens to store this. Instead just make a few error kinds and have a lookup table for their meaning.