add plugin and fix example
Some checks failed
judge / Build judge (push) Successful in 1m8s
judge / Linux / gcc / Debug (push) Successful in 8s
judge / Linux / clang / Release (push) Successful in 10s
judge / Linux / gcc / Release (push) Successful in 10s
judge / Linux / gcc / Sanitized (push) Successful in 9s
judge / Linux / clang / Sanitized (push) Successful in 9s
judge / Linux / gcc / Debug (valgrind) (push) Successful in 22s
judge / Windows / clang / Debug (push) Successful in 40s
judge / Windows / clang / Release (push) Successful in 40s
judge / Windows / msvc / Debug (push) Successful in 45s
judge / Windows / msvc / Release (push) Successful in 43s
judge / SUMMARY (push) Failing after 2s
Some checks failed
judge / Build judge (push) Successful in 1m8s
judge / Linux / gcc / Debug (push) Successful in 8s
judge / Linux / clang / Release (push) Successful in 10s
judge / Linux / gcc / Release (push) Successful in 10s
judge / Linux / gcc / Sanitized (push) Successful in 9s
judge / Linux / clang / Sanitized (push) Successful in 9s
judge / Linux / gcc / Debug (valgrind) (push) Successful in 22s
judge / Windows / clang / Debug (push) Successful in 40s
judge / Windows / clang / Release (push) Successful in 40s
judge / Windows / msvc / Debug (push) Successful in 45s
judge / Windows / msvc / Release (push) Successful in 43s
judge / SUMMARY (push) Failing after 2s
This commit is contained in:
BIN
editor/.DS_Store
vendored
Normal file
BIN
editor/.DS_Store
vendored
Normal file
Binary file not shown.
29
editor/vscode-jdg/README.md
Normal file
29
editor/vscode-jdg/README.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Judge DSL — VS Code extension
|
||||||
|
|
||||||
|
Syntax highlighting for `.jdg` files (the judge test-suite DSL).
|
||||||
|
|
||||||
|
## Install (local, no marketplace)
|
||||||
|
|
||||||
|
### VS Code
|
||||||
|
|
||||||
|
Copy this directory into your extensions folder — VS Code loads it on next
|
||||||
|
restart:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# VS Code
|
||||||
|
cp -r editor/vscode-jdg ~/.vscode/extensions/jdg-language-0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart the editor, open any `.jdg` file — you should see keywords, strings,
|
||||||
|
durations highlighted.
|
||||||
|
|
||||||
|
### Package as `.vsix` (shareable)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install -g @vscode/vsce
|
||||||
|
cd editor/vscode-jdg
|
||||||
|
vsce package
|
||||||
|
# → jdg-language-0.1.0.vsix
|
||||||
|
```
|
||||||
|
|
||||||
|
Then in VS Code: `Extensions` → `...` → `Install from VSIX`.
|
||||||
BIN
editor/vscode-jdg/jdg-language-0.1.0.vsix
Normal file
BIN
editor/vscode-jdg/jdg-language-0.1.0.vsix
Normal file
Binary file not shown.
24
editor/vscode-jdg/language-configuration.json
Normal file
24
editor/vscode-jdg/language-configuration.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"comments": {
|
||||||
|
"lineComment": "//"
|
||||||
|
},
|
||||||
|
"brackets": [
|
||||||
|
["{", "}"],
|
||||||
|
["(", ")"]
|
||||||
|
],
|
||||||
|
"autoClosingPairs": [
|
||||||
|
{ "open": "{", "close": "}" },
|
||||||
|
{ "open": "(", "close": ")" },
|
||||||
|
{ "open": "\"", "close": "\"", "notIn": ["string"] },
|
||||||
|
{ "open": "\"\"\"", "close": "\"\"\"" }
|
||||||
|
],
|
||||||
|
"surroundingPairs": [
|
||||||
|
["{", "}"],
|
||||||
|
["(", ")"],
|
||||||
|
["\"", "\""]
|
||||||
|
],
|
||||||
|
"indentationRules": {
|
||||||
|
"increaseIndentPattern": "^.*\\{[^}]*$",
|
||||||
|
"decreaseIndentPattern": "^\\s*\\}"
|
||||||
|
}
|
||||||
|
}
|
||||||
22
editor/vscode-jdg/package.json
Normal file
22
editor/vscode-jdg/package.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "jdg-language",
|
||||||
|
"displayName": "Judge DSL (.jdg)",
|
||||||
|
"description": "Syntax highlighting for judge test-suite files",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"publisher": "judge",
|
||||||
|
"engines": { "vscode": "^1.60.0" },
|
||||||
|
"categories": ["Programming Languages"],
|
||||||
|
"contributes": {
|
||||||
|
"languages": [{
|
||||||
|
"id": "jdg",
|
||||||
|
"aliases": ["Judge DSL", "jdg"],
|
||||||
|
"extensions": [".jdg"],
|
||||||
|
"configuration": "./language-configuration.json"
|
||||||
|
}],
|
||||||
|
"grammars": [{
|
||||||
|
"language": "jdg",
|
||||||
|
"scopeName": "source.jdg",
|
||||||
|
"path": "./syntaxes/jdg.tmLanguage.json"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
83
editor/vscode-jdg/syntaxes/jdg.tmLanguage.json
Normal file
83
editor/vscode-jdg/syntaxes/jdg.tmLanguage.json
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||||
|
"name": "Judge DSL",
|
||||||
|
"scopeName": "source.jdg",
|
||||||
|
"fileTypes": ["jdg"],
|
||||||
|
"patterns": [
|
||||||
|
{ "include": "#comments" },
|
||||||
|
{ "include": "#heredoc" },
|
||||||
|
{ "include": "#string" },
|
||||||
|
{ "include": "#duration" },
|
||||||
|
{ "include": "#number" },
|
||||||
|
{ "include": "#boolean" },
|
||||||
|
{ "include": "#top-keywords" },
|
||||||
|
{ "include": "#block-keywords" },
|
||||||
|
{ "include": "#matcher-keywords" },
|
||||||
|
{ "include": "#scoring-values" },
|
||||||
|
{ "include": "#operators" },
|
||||||
|
{ "include": "#braces" },
|
||||||
|
{ "include": "#identifier" }
|
||||||
|
],
|
||||||
|
"repository": {
|
||||||
|
"comments": {
|
||||||
|
"name": "comment.line.double-slash.jdg",
|
||||||
|
"match": "//.*$"
|
||||||
|
},
|
||||||
|
"heredoc": {
|
||||||
|
"name": "string.quoted.triple.jdg",
|
||||||
|
"begin": "\"\"\"",
|
||||||
|
"end": "\"\"\"",
|
||||||
|
"patterns": [
|
||||||
|
{ "name": "constant.character.escape.jdg", "match": "\\\\[nt\\\\\"]" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"string": {
|
||||||
|
"name": "string.quoted.double.jdg",
|
||||||
|
"begin": "\"",
|
||||||
|
"end": "\"",
|
||||||
|
"patterns": [
|
||||||
|
{ "name": "constant.character.escape.jdg", "match": "\\\\[nt\\\\\"]" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"duration": {
|
||||||
|
"name": "constant.numeric.duration.jdg",
|
||||||
|
"match": "\\b-?\\d+(?:\\.\\d+)?(?:ms|s|m|h)\\b"
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"name": "constant.numeric.jdg",
|
||||||
|
"match": "\\b-?\\d+(?:\\.\\d+)?\\b"
|
||||||
|
},
|
||||||
|
"boolean": {
|
||||||
|
"name": "constant.language.boolean.jdg",
|
||||||
|
"match": "\\b(?:true|false)\\b"
|
||||||
|
},
|
||||||
|
"top-keywords": {
|
||||||
|
"name": "keyword.control.jdg",
|
||||||
|
"match": "\\b(?:build|build_linux|build_windows|build_darwin|binary|timeout|normalize_crlf|trim_trailing_ws|group|test|pattern|env|file|outFile)\\b"
|
||||||
|
},
|
||||||
|
"block-keywords": {
|
||||||
|
"name": "variable.parameter.jdg",
|
||||||
|
"match": "\\b(?:weight|scoring|wrapper|stdin|stdout|stderr|args|exitCode|input|output|dirs)\\b"
|
||||||
|
},
|
||||||
|
"matcher-keywords": {
|
||||||
|
"name": "support.function.jdg",
|
||||||
|
"match": "\\b(?:contains|matches|anyOrder|of)\\b"
|
||||||
|
},
|
||||||
|
"scoring-values": {
|
||||||
|
"name": "constant.language.jdg",
|
||||||
|
"match": "\\b(?:partial|all_or_none)\\b"
|
||||||
|
},
|
||||||
|
"operators": {
|
||||||
|
"name": "keyword.operator.jdg",
|
||||||
|
"match": "[=~]"
|
||||||
|
},
|
||||||
|
"braces": {
|
||||||
|
"name": "punctuation.section.braces.jdg",
|
||||||
|
"match": "[{}()]"
|
||||||
|
},
|
||||||
|
"identifier": {
|
||||||
|
"name": "variable.other.jdg",
|
||||||
|
"match": "\\b[A-Za-z_][A-Za-z0-9_]*\\b"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
// Under MSVC on CI we use build_windows (cl's CLI is different).
|
// Under MSVC on CI we use build_windows (cl's CLI is different).
|
||||||
|
|
||||||
build "$CC -O2 -std=c11 -Wall -Wextra solution.c -o solution"
|
build "$CC -O2 -std=c11 -Wall -Wextra solution.c -o solution"
|
||||||
build_windows "cl /nologo /O2 /W3 solution.c /Fe:solution.exe"
|
|
||||||
|
|
||||||
binary = "solution"
|
binary = "solution"
|
||||||
timeout 5s
|
timeout 5s
|
||||||
|
|||||||
Reference in New Issue
Block a user