Hi all,
I’m happy to announce ColoredLLCodes.jl, a syntax highlighter for code_llvm
and code_native
100% in Julia.
All you have to do is install and load the package.
This package started from Why are `code_llvm` and `code_native` not displayed in color?. I made a feature request (proposal) in the JuliaLang/julia repository (Issue #36634), and I submitted a PR to port this highlighting feature to InteractiveUtils
(PR #36984).
I’m neutral about whether or not the syntax highlighting feature should be in InteractiveUtils
, and I think both opinions are reasonable. So, I would be grateful for your opinion on (in) the PR.
FYI, this package is based on a heuristic approach, not the formal grammar of LLVM IR or assembly languages. I’m not sure about the quality of highlighting for LLVM IR, since I prefer @code_native
over @code_llvm
. Also, I do not have a machine with new instruction sets such as Intel AVX-512, ARM SVE. So if you find a parsing failure, feel free to submit an issue to the ColoredLLCodes repository.