diff options
author | unrelentingtech | 2022-04-29 20:08:00 +0000 |
---|---|---|
committer | GitHub | 2022-04-29 20:08:00 +0000 |
commit | 8e77e3388c5ea23f22bb5f8e7ff50906ff0116a3 (patch) | |
tree | 9bf7c4d7c617685c56f62e54271430455343224e /runtime/queries | |
parent | 030e7ab9884d9f319993a1987d64fa45956aaefe (diff) |
feat(lang): add devicetree (Flattened Device Tree Source) (#2329)
Diffstat (limited to 'runtime/queries')
-rw-r--r-- | runtime/queries/devicetree/highlights.scm | 66 | ||||
-rw-r--r-- | runtime/queries/devicetree/indents.scm | 12 |
2 files changed, 78 insertions, 0 deletions
diff --git a/runtime/queries/devicetree/highlights.scm b/runtime/queries/devicetree/highlights.scm new file mode 100644 index 00000000..d27c79e4 --- /dev/null +++ b/runtime/queries/devicetree/highlights.scm @@ -0,0 +1,66 @@ +[ + "/dts-v1/" + "/memreserve/" + "/delete-node/" + "/delete-property/" +] @keyword + +[ + "#define" + "#include" +] @keyword.directive + +[ + "!" + "~" + "-" + "+" + "*" + "/" + "%" + "||" + "&&" + "|" + "^" + "&" + "==" + "!=" + ">" + ">=" + "<=" + ">" + "<<" + ">>" +] @operator + +[ + "," + ";" +] @punctuation.delimiter + +[ + "(" + ")" + "{" + "}" + "<" + ">" +] @punctuation.bracket + +(string_literal) @string + +(integer_literal) @constant.numeric.integer + +(call_expression + function: (identifier) @function) + +(labeled_item + label: (identifier) @label) + +(identifier) @variable + +(unit_address) @tag + +(reference) @constant + +(comment) @comment diff --git a/runtime/queries/devicetree/indents.scm b/runtime/queries/devicetree/indents.scm new file mode 100644 index 00000000..06490889 --- /dev/null +++ b/runtime/queries/devicetree/indents.scm @@ -0,0 +1,12 @@ +[ + (node) + (byte_string_literal) + (parenthesized_expression) + (argument_list) +] @indent + +[ + "}" + "]" + ")" +] @outdent
\ No newline at end of file |