[PATCH] D95552: [vim] Add initial syntax definition for .mir files

Cassie Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 13:04:08 PST 2021


porglezomp added a comment.

A question for reviewers who might be able to explain:



================
Comment at: llvm/utils/vim/syntax/machine-ir.vim:10
+runtime! syntax/llvm.vim
+unlet b:current_syntax
+let b:current_syntax = "mir"
----------------
I actually don't need this `unlet` I don't think…


================
Comment at: llvm/utils/vim/syntax/mir.vim:9
+elseif exists("b:current_syntax")
+  finish
+endif
----------------
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?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95552/new/

https://reviews.llvm.org/D95552



More information about the llvm-commits mailing list