feat: pattern support args and multiple variants; add zed extension for highlight
All checks were successful
build-dsl-smoke / Build judge (push) Successful in 13s
build-dsl-smoke / debug / clang / linux (push) Successful in 6s
build-dsl-smoke / debug / gcc / linux (push) Successful in 8s
build-dsl-smoke / release / clang / linux (push) Successful in 9s
build-dsl-smoke / release / gcc / linux (push) Successful in 7s
build-dsl-smoke / sanitized / clang / linux (push) Successful in 8s
build-dsl-smoke / sanitized / gcc / linux (push) Successful in 7s
build-dsl-smoke / debug / clang / windows (push) Successful in 16s
build-dsl-smoke / debug-valgrind / gcc / linux (push) Successful in 14s
build-dsl-smoke / debug / msvc / windows (push) Successful in 18s
build-dsl-smoke / release / clang / windows (push) Successful in 17s
build-dsl-smoke / release / msvc / windows (push) Successful in 17s
build-dsl-smoke / SUMMARY (push) Successful in 5s
All checks were successful
build-dsl-smoke / Build judge (push) Successful in 13s
build-dsl-smoke / debug / clang / linux (push) Successful in 6s
build-dsl-smoke / debug / gcc / linux (push) Successful in 8s
build-dsl-smoke / release / clang / linux (push) Successful in 9s
build-dsl-smoke / release / gcc / linux (push) Successful in 7s
build-dsl-smoke / sanitized / clang / linux (push) Successful in 8s
build-dsl-smoke / sanitized / gcc / linux (push) Successful in 7s
build-dsl-smoke / debug / clang / windows (push) Successful in 16s
build-dsl-smoke / debug-valgrind / gcc / linux (push) Successful in 14s
build-dsl-smoke / debug / msvc / windows (push) Successful in 18s
build-dsl-smoke / release / clang / windows (push) Successful in 17s
build-dsl-smoke / release / msvc / windows (push) Successful in 17s
build-dsl-smoke / SUMMARY (push) Successful in 5s
This commit is contained in:
2
editor/zed/languages/jdg/brackets.scm
Normal file
2
editor/zed/languages/jdg/brackets.scm
Normal file
@@ -0,0 +1,2 @@
|
||||
("{" @open "}" @close)
|
||||
("(" @open ")" @close)
|
||||
12
editor/zed/languages/jdg/config.toml
Normal file
12
editor/zed/languages/jdg/config.toml
Normal file
@@ -0,0 +1,12 @@
|
||||
name = "JDG"
|
||||
grammar = "jdg"
|
||||
path_suffixes = ["jdg"]
|
||||
line_comments = ["// "]
|
||||
autoclose_before = ";:.,=}])>"
|
||||
brackets = [
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "(", end = ")", close = true, newline = false },
|
||||
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] },
|
||||
]
|
||||
word_characters = ["_"]
|
||||
tab_size = 4
|
||||
100
editor/zed/languages/jdg/highlights.scm
Normal file
100
editor/zed/languages/jdg/highlights.scm
Normal file
@@ -0,0 +1,100 @@
|
||||
(comment) @comment
|
||||
|
||||
[
|
||||
"include"
|
||||
"build"
|
||||
"build_defaults"
|
||||
"build_linux"
|
||||
"build_windows"
|
||||
"build_darwin"
|
||||
"toolchains"
|
||||
"binary"
|
||||
"sources"
|
||||
"timeout"
|
||||
"memory_limit"
|
||||
"group"
|
||||
"test"
|
||||
"pattern"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"normalize_crlf"
|
||||
"trim_trailing_ws"
|
||||
] @keyword
|
||||
|
||||
(build_scalar_field name: _ @property)
|
||||
(build_list_field name: _ @property)
|
||||
(bool_decl name: _ @property)
|
||||
(legacy_build_platform keyword: _ @keyword)
|
||||
|
||||
[
|
||||
"profile"
|
||||
"warnings"
|
||||
"define"
|
||||
"platforms"
|
||||
"binary"
|
||||
"class"
|
||||
"weight"
|
||||
"scoring"
|
||||
"wrapper"
|
||||
"env"
|
||||
"stdin"
|
||||
"stdout"
|
||||
"stderr"
|
||||
"args"
|
||||
"exitCode"
|
||||
"file"
|
||||
"outFile"
|
||||
"input"
|
||||
"output"
|
||||
"dirs"
|
||||
] @property
|
||||
|
||||
[
|
||||
"linux"
|
||||
"windows"
|
||||
"darwin"
|
||||
] @type.builtin
|
||||
|
||||
(profile_value) @constant.builtin
|
||||
(warnings_value) @constant.builtin
|
||||
(scoring_value) @constant.builtin
|
||||
(class_value) @constant.builtin
|
||||
(bool) @constant.builtin
|
||||
|
||||
"of" @keyword.operator
|
||||
|
||||
[
|
||||
"contains"
|
||||
"matches"
|
||||
"anyOrder"
|
||||
] @function.builtin
|
||||
|
||||
[
|
||||
"="
|
||||
"~"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
(simple_string) @string
|
||||
(heredoc_string) @string
|
||||
(regex_string) @string.regex
|
||||
|
||||
(structured_build name: (string) @string.special)
|
||||
(legacy_build command: (string) @string.special)
|
||||
(toolchain_entry name: (string) @type)
|
||||
(toolchain_entry name: (identifier) @type)
|
||||
(group name: (string) @string.special)
|
||||
(test name: (string) @string.special)
|
||||
(include path: (string) @string.special.path)
|
||||
|
||||
(define_field key: (string) @constant.macro)
|
||||
(env_decl key: (string) @constant.macro)
|
||||
(file_decl key: (string) @string.special.path)
|
||||
(out_file_decl key: (string) @string.special.path)
|
||||
11
editor/zed/languages/jdg/indents.scm
Normal file
11
editor/zed/languages/jdg/indents.scm
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
(build_block)
|
||||
(toolchains)
|
||||
(toolchain_entry)
|
||||
(group)
|
||||
(test)
|
||||
(pattern)
|
||||
(any_order_matcher)
|
||||
] @indent
|
||||
|
||||
"}" @end
|
||||
7
editor/zed/languages/jdg/injections.scm
Normal file
7
editor/zed/languages/jdg/injections.scm
Normal file
@@ -0,0 +1,7 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((regex_matcher
|
||||
pattern: (regex_string) @injection.content)
|
||||
(#set! injection.language "regex")
|
||||
(#set! injection.include-children))
|
||||
23
editor/zed/languages/jdg/outline.scm
Normal file
23
editor/zed/languages/jdg/outline.scm
Normal file
@@ -0,0 +1,23 @@
|
||||
(structured_build
|
||||
"build" @context
|
||||
name: (string) @name) @item
|
||||
|
||||
(build_defaults
|
||||
"build_defaults" @context) @item
|
||||
|
||||
(toolchains
|
||||
"toolchains" @context) @item
|
||||
|
||||
(toolchain_entry
|
||||
name: (_) @name) @item
|
||||
|
||||
(group
|
||||
"group" @context
|
||||
name: (string) @name) @item
|
||||
|
||||
(test
|
||||
"test" @context
|
||||
name: (string) @name) @item
|
||||
|
||||
(pattern
|
||||
"pattern" @context) @item
|
||||
Reference in New Issue
Block a user