I can’t find a spec that describes:
- All the literals (characters, integers and floats in different bases)
- Strings and everything you can put inside them. I know about
\c(normal escape)\xHH,\x{H*}and\uHHHH, but are there more? - all the size specs for binaries. For example, there are
<< a::size(i) >>and<< byte-size::byte-size(i) >>. But is there any reference for all of them?
This is quite irrelevant for my day-to-day coding (besides the binary pattern matching I don’t use any of these things), but I’m writing a syntax highlighting library in elixir. It’s almost a port of Pygments (a python library) to elixir. Without a good reference for what kinds of literals are supported it’s hard… I’ve been following the original Pygments lexer as a reference, but it has some mistakes (it lexes as valid things that are not valid Elixir syntax).
BTW, demo website for my (to be released) library: https://tmbb.github.io/makeup_demo/index.html
It’ll be called Makeup. Currently it highlights Elixir (badly, because of the points above) and HTML5 (better, but doesn’t highlight embedded CSS or JS yet). After releasing the library I’ll be asking for contributions of new lexers for other programming/markup languages ![]()






















