Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/json-ld/highlights.scm')
| -rw-r--r-- | runtime/queries/json-ld/highlights.scm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/runtime/queries/json-ld/highlights.scm b/runtime/queries/json-ld/highlights.scm new file mode 100644 index 00000000..8fccb10a --- /dev/null +++ b/runtime/queries/json-ld/highlights.scm @@ -0,0 +1,43 @@ +; inherits: json + +; https://www.w3.org/TR/json-ld/#syntax-tokens-and-keywords +((string (string_content) @keyword) + (#any-of? @keyword + "@base" + "@container" + "@context" + "@direction" + "@graph" + "@id" + "@import" + "@included" + "@index" + "@json" + "@language" + "@list" + "@nest" + "@none" + "@prefix" + "@propagate" + "@protected" + "@reverse" + "@set" + "@type" + "@value" + "@version" + "@vocab")) + +((pair + value: (string (string_content) @string.special.url)) + (#match? @string.special.url "^https?://")) + +((array + (string (string_content) @string.special.url)) + (#match? @string.special.url "^https?://")) + +; https://www.w3.org/TR/json-ld/#dfn-base-direction +((pair + key: (string (string_content) @keyword) + value: (string (string_content) @type.enum.variant)) + (#eq? @keyword "@direction") + (#any-of? @type.enum.variant "ltr" "rtl")) |