Add llvm grammar (#1167)

imgbot
Kirawi 3 years ago committed by GitHub
parent dc53e65b9e
commit 6f1a7b1220
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
.gitmodules vendored

@ -146,3 +146,7 @@
path = helix-syntax/languages/tree-sitter-wgsl
url = https://github.com/szebniok/tree-sitter-wgsl
shallow = true
[submodule "helix-syntax/tree-sitter-llvm"]
path = helix-syntax/languages/tree-sitter-llvm
url = https://github.com/benwilliamgraham/tree-sitter-llvm
shallow = true

@ -145,11 +145,12 @@ We use a similar set of scopes as
- `conditional` - `if`, `else`
- `repeat` - `for`, `while`, `loop`
- `import` - `import`, `export`
- (TODO: return?)
- `return`
- `operator` - `or`, `in`
- `directive` - Preprocessor directives (`#if` in C)
- `function` - `fn`, `func`
- `operator` - `||`, `+=`, `>`, `or`
- `operator` - `||`, `+=`, `>`
- `function`
- `builtin`

@ -413,3 +413,11 @@ file-types = ["wgsl"]
roots = []
comment-token = "//"
indent = { tab-width = 4, unit = " " }
[[language]]
name = "llvm"
scope = "source.llvm"
roots = []
file-types = ["ll"]
comment-token = ";"
indent = { tab-width = 2, unit = " " }

@ -0,0 +1,14 @@
(type) @type
(statement) @keyword.operator
(number) @constant.numeric.integer
(comment) @comment
(string) @string
(label) @label
(keyword) @keyword
"ret" @keyword.control.return
(boolean) @constant.builtin.boolean
(float) @constant.numeric.float
(constant) @constant
(identifier) @variable
(symbol) @punctuation.delimiter
(bracket) @punctuation.bracket
Loading…
Cancel
Save