This initial definition handles the yaml container and the embedding of
the inner IRs. As a stopgap, this reuses the LLVM IR syntax highlighting
for the MIR function bodies--even though it's not technically correct,
it produces decent highlighting for a first pass.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
A question for reviewers who might be able to explain:
llvm/utils/vim/syntax/machine-ir.vim | ||
---|---|---|
11 | I actually don't need this unlet I don't think… | |
llvm/utils/vim/syntax/mir.vim | ||
10 | I don't understand why we bail out if a current_syntax is defined—I just copied this from the llvm.vim file. It seems to cause trouble with embedding syntax inside other syntax, but I assume it does something else useful to make up for that? |
Can't say I know much about these things - but honestly, if it works enough/helps you, it doesn't seem like it'd do any harm to the project, so I'm good with it.
Out of curiosity, why is there both an mir.vim and a machine-ir.vim?
The MIR syntax is based on extending the yaml syntax and then embedding the machine-ir syntax inside it, I've defined it as two separate files so it's easier to separate "highlighting the instructions" from "embedding it inside yaml".
ah, fair enough - thanks for explaining!
Can you commit these yourself (do you have commit access) or would you like me to do it for you?
I actually don't need this unlet I don't think…