helix/runtime/queries/llvm-mir-yaml/injections.scm
Sebastian Neubauer 641255ccc8
Add llvm-mir highlighting (#1398)
* Add injection regex for more languages

To support embedding them in other languages like markdown.

* Add llvm-mir highlighting

LLVM Machine IR is dumped as yaml files that can embed LLVM IR and
Machine IR.

To support this, add a llvm-mir-yaml language that uses the yaml
parser, but uses different injections to highlight IR and MIR.

* Update submodule with fixed multiline comments

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-01-04 10:52:34 +09:00

10 lines
327 B
Scheme

; inherits: yaml
((document (block_node (block_scalar) @injection.content))
(#set! injection.language "llvm"))
((document (block_node (block_mapping (block_mapping_pair
key: (flow_node (plain_scalar (string_scalar))) ; "body"
value: (block_node (block_scalar) @injection.content)))))
(#set! injection.language "mir"))