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

This commit is contained in:
2026-04-11 14:37:43 +03:00
parent dacae83dc6
commit 7f9f6a0a6e
29 changed files with 11429 additions and 94 deletions

View File

@@ -0,0 +1,2 @@
("{" @open "}" @close)
("(" @open ")" @close)

View 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

View 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)

View File

@@ -0,0 +1,11 @@
[
(build_block)
(toolchains)
(toolchain_entry)
(group)
(test)
(pattern)
(any_order_matcher)
] @indent
"}" @end

View 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))

View 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