This commit is contained in:
Vendored
+24
-24
@@ -3,28 +3,28 @@
|
|||||||
// Hover to view descriptions of existing attributes.
|
// Hover to view descriptions of existing attributes.
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
{
|
{
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Run Extension",
|
"name": "Run Extension",
|
||||||
"type": "extensionHost",
|
"type": "extensionHost",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"runtimeExecutable": "${execPath}",
|
"runtimeExecutable": "${execPath}",
|
||||||
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
|
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
|
||||||
"outFiles": ["${workspaceFolder}/out/**/*.js"],
|
"outFiles": ["${workspaceFolder}/client/out/**/*.js"],
|
||||||
"preLaunchTask": "npm: watch"
|
"preLaunchTask": "npm: watch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Extension Tests",
|
"name": "Extension Tests",
|
||||||
"type": "extensionHost",
|
"type": "extensionHost",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"runtimeExecutable": "${execPath}",
|
"runtimeExecutable": "${execPath}",
|
||||||
"args": [
|
"args": [
|
||||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||||
"--extensionTestsPath=${workspaceFolder}/out/test"
|
"--extensionTestsPath=${workspaceFolder}/out/test"
|
||||||
],
|
],
|
||||||
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
|
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
|
||||||
"preLaunchTask": "npm: watch"
|
"preLaunchTask": "npm: watch"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,14 +37,22 @@ export function formatDefFile(content: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function isFirstLineMachine(content: string): boolean {
|
export function isFirstLineMachine(content: string): boolean {
|
||||||
const firstLine = content.split("\n")[0].trim()
|
const lines = content.split("\n").map((line) => line.trim())
|
||||||
const machineRegex = /^MACHINE\s+\S+/
|
for (const line of lines) {
|
||||||
return machineRegex.test(firstLine)
|
console.log(line)
|
||||||
|
if (line === "" || line.startsWith("#")) {
|
||||||
|
console.log("skipping line")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
const machineRegex = /^MACHINE\s+\S+/
|
||||||
|
return machineRegex.test(line)
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
export function diagnosticHandler(document: vscode.TextDocument) {
|
export function diagnosticHandler(document: vscode.TextDocument) {
|
||||||
|
const diagnostics: vscode.Diagnostic[] = []
|
||||||
if (document.languageId === "cdl" || document.languageId === "def") {
|
if (document.languageId === "cdl" || document.languageId === "def") {
|
||||||
const diagnostics: vscode.Diagnostic[] = []
|
|
||||||
if (!isFirstLineMachine(document.getText())) {
|
if (!isFirstLineMachine(document.getText())) {
|
||||||
const range = new vscode.Range(
|
const range = new vscode.Range(
|
||||||
document.positionAt(0),
|
document.positionAt(0),
|
||||||
@@ -52,13 +60,13 @@ export function diagnosticHandler(document: vscode.TextDocument) {
|
|||||||
)
|
)
|
||||||
const diagnostic = new vscode.Diagnostic(
|
const diagnostic = new vscode.Diagnostic(
|
||||||
range,
|
range,
|
||||||
"The first line of the CDL file should contain 'MACHINE'.",
|
"The first line should contain 'MACHINE'.",
|
||||||
vscode.DiagnosticSeverity.Error
|
vscode.DiagnosticSeverity.Error
|
||||||
)
|
)
|
||||||
diagnostics.push(diagnostic)
|
diagnostics.push(diagnostic)
|
||||||
}
|
}
|
||||||
return diagnostics
|
|
||||||
}
|
}
|
||||||
|
return diagnostics
|
||||||
}
|
}
|
||||||
|
|
||||||
export function completionHandlerCdl(document: vscode.TextDocument, position: vscode.Position) {
|
export function completionHandlerCdl(document: vscode.TextDocument, position: vscode.Position) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es2019",
|
"target": "es2019",
|
||||||
"lib": ["ES2019"],
|
"lib": ["ES2019"],
|
||||||
"outDir": "./out",
|
"outDir": "./dist",
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"sourceMap": true
|
"sourceMap": true
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-4
@@ -6,9 +6,9 @@
|
|||||||
"publisher": "Christoph",
|
"publisher": "Christoph",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.cbsk-tech.de/Christoph/vscode-cdl.git"
|
"url": "https://git.cbsk-tech.de/Christoph/nx_post_support.git"
|
||||||
},
|
},
|
||||||
"main": "./client/out/src/extension.js",
|
"main": "./client/dist/extension.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cdl",
|
"cdl",
|
||||||
"NX CDL",
|
"NX CDL",
|
||||||
@@ -75,9 +75,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "vite build",
|
"compile": "node esbuild.js --production",
|
||||||
"watch": "node esbuild.js --watch",
|
"watch": "node esbuild.js --watch",
|
||||||
"package": "vite build --mode production"
|
"package": "node esbuild.js --production"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/vscode": "^1.96.0",
|
"@types/vscode": "^1.96.0",
|
||||||
|
|||||||
-638
@@ -1,638 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0"><!-- Generated via Iro -->
|
|
||||||
<dict>
|
|
||||||
<key>fileTypes</key>
|
|
||||||
<array>
|
|
||||||
<string>tcl</string>
|
|
||||||
</array>
|
|
||||||
<key>name</key>
|
|
||||||
<string>tcl</string>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#main</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>scopeName</key>
|
|
||||||
<string>source.tcl</string>
|
|
||||||
<key>uuid</key>
|
|
||||||
<string>c7017136-2ff2-48e9-bdb0-570cf238b4a2</string>
|
|
||||||
<key>repository</key>
|
|
||||||
<dict>
|
|
||||||
<key>main</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#command</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>args</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#quoted_args</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#numeric</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>((?<=;)\s*#.*$)</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>comment.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Inline comments.</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>braced</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>begin</key>
|
|
||||||
<string>((?<!\\)\{)</string>
|
|
||||||
<key>beginCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>punctuation.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#braced__1</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>end</key>
|
|
||||||
<string>(\}([^\s\]]*))</string>
|
|
||||||
<key>endCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>punctuation.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>braced__1</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(\\(?:\d{1,3}|x[a-fA-F0-9]{1,2}|u[a-fA-F0-9]{1,4}|U[a-fA-F0-9]{1,8}|.))</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>constant.character.escape.tcl</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#keywords</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>((?<={)\s*(?:after|append|apply|array|auto_execok|auto_import|auto_load|auto_mkindex|auto_qualify|auto_reset|bgerror|binary|break|catch|cd|chan|clock|close|concat|continue|coroutine|dde|dict|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|fileevent|file|flush|foreach|for|format|gets|global|glob|history|http|if|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|lmap|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|memory|my|namespace|nextto|next|oo::class|oo::copy|oo::define|oo::objdefine|oo::object|open|package|parray|pid|pkg::create|pkg_mkIndex|platform::shell|proc|puts|pwd|read|regexp|registry|regsub|rename|return|scan|seek|self|set|socket|source|split|string|subst|switch|tailcall|tcl::prefix|tcl_endOfWord|tcl_findLibrary|tcl_startOfNextWord|tcl_startOfPreviousWord|tcl_wordBreakAfter|tcl_wordBreakBefore|tell|throw|time|trace|try|unknown|unload|unset|update|uplevel|upvar|variable|vwait|while|yieldto|yield)\s+)</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>keyword.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Special handling for known commands.</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#braced_inner</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#args</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>braced_inner</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>begin</key>
|
|
||||||
<string>(\{)</string>
|
|
||||||
<key>beginCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>punctuation.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#braced_inner__1</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>end</key>
|
|
||||||
<string>(\})</string>
|
|
||||||
<key>endCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>punctuation.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>braced_inner__1</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(\\[\x{007b}\x{007d}])</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>constant.character.escape.tcl</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#numeric</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#braced_inner</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#args</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>braced_lit</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>((?:(?<!\\){)(?:[^\x{007b}\x{007d}\n]*(?:\g<1>(?:\\{|\\}|[^\x{007b}\x{007d}])*)*)})</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>none.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Handle braced literal.</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>braced_lit_re</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>((?:(?<!\\){)(?:[^\x{007b}\x{007d}\n]*(?:\g<1>(?:\\{|\\}|[^\x{007b}\x{007d}])*)*)})</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.regexp.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Handle braced regex pattern.</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>command</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>begin</key>
|
|
||||||
<string>(\\\s*$)</string>
|
|
||||||
<key>beginCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>constant.character.escape.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#command__1</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>end</key>
|
|
||||||
<string>((?<!\\\s)$)</string>
|
|
||||||
<key>endCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>none.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(^\s*#.*)</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>comment.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Line comments.</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(\{\s*$|^\s*\})</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>punctuation.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Leading/trailing curly braces.</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(?<=^|{)(\s*proc\s+)(\S+\s+)((?:(?<!\\){)(?:[^\x{007b}\x{007d}\n]*(?:\g<1>(?:\\{|\\}|[^\x{007b}\x{007d}])*)*)})</string>
|
|
||||||
<key>captures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>keyword.tcl</string>
|
|
||||||
</dict>
|
|
||||||
<key>2</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>entity.name.function.tcl</string>
|
|
||||||
</dict>
|
|
||||||
<key>3</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>none.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Proc command.</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#regexp</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#keywords</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(^\s*\S+|(?:(?<=[^\x{005c}]\[)[^\s\]]++(?!\])))</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>keyword.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>All other commands. (NOTE: Iro doesn't support possessive quantifiers, but the grammar does; be sure to replace the second + with ++ after regenerating!)</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#args</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>command__1</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#keywords</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#args</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>embedded</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>begin</key>
|
|
||||||
<string>((?<!\\)\[)</string>
|
|
||||||
<key>beginCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>punctuation.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#embedded__1</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>end</key>
|
|
||||||
<string>((?<!\\)\])</string>
|
|
||||||
<key>endCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>punctuation.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>embedded__1</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#command</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>keywords</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>((?<=^|[\[\x{007b}\x{003b}])\s*(break|catch|continue|default|error|exit|foreach|for|if|return|switch|throw|try|while)\b)</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>keyword.control.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Keywords.</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>((?<=^|})\s*(then|elseif|else)\b)</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>keyword.control.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Inline keywords.</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>numeric</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>((?:\b|[\+\-\.])(?:0b[01]+|0o[0-7]+|0x[0-9a-fA-F]+|(?:\d*\.\d+(?:[Ee][-\x{002b}]?\d+)?)|(?:\d+\.?[Ee][-\x{002b}]?\d+)|\d+|[Ii][Nn][Ff]|[Nn][Aa][Nn])\b)</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>constant.numeric.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>quoted</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>begin</key>
|
|
||||||
<string>((?<!\\)")</string>
|
|
||||||
<key>beginCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#quoted__1</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>end</key>
|
|
||||||
<string>(")</string>
|
|
||||||
<key>endCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>quoted__1</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#quoted_args</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>([^\x{0024}\x{005b}\x{0022}\x{005c}]+)</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>quoted_args</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#braced</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#quoted</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#embedded</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(\\(?:\d{1,3}|x[a-fA-F0-9]{1,2}|u[a-fA-F0-9]{1,4}|U[a-fA-F0-9]{1,8}|.))</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>constant.character.escape.tcl</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#variable</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>regexp</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>begin</key>
|
|
||||||
<string>((?<=^|[\[\x{007b}\x{003b}])\s*(?:regexp|regsub)\s+)((?:(?:(?:-about|-all|-expanded|-indices|-inline|-lineanchor|-linestop|-line|-nocase|(?:-index\s+(?:end|\d+)(?:[\+\-]-?\d+)?))\s+)*(?:--\s+)?)?)</string>
|
|
||||||
<key>beginCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>keyword.tcl</string>
|
|
||||||
</dict>
|
|
||||||
<key>2</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>none.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#regexp__1</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>end</key>
|
|
||||||
<string>(\s+)</string>
|
|
||||||
<key>endCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>none.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#args</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>regexp__1</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#braced_lit_re</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>begin</key>
|
|
||||||
<string>((?:(?<!\\)"))</string>
|
|
||||||
<key>beginCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.regexp.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#regexp__2</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>end</key>
|
|
||||||
<string>((?:(?<!\\)"))</string>
|
|
||||||
<key>endCaptures</key>
|
|
||||||
<dict>
|
|
||||||
<key>1</key>
|
|
||||||
<dict>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.regexp.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#variable</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(\S+)</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.regexp.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>Handle bare regex pattern.</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>regexp__2</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#braced_lit_re</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#embedded</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#variable</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(\\"|[^\x{0022}])</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.regexp.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>All other quoted text.</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>variable</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(\$(?:(?:[a-zA-Z0-9_]|::)+(?:\([^\)]+\))?|\{(?:[^\}]*|[^\}\x{0028}]+\([^\}\x{0029}]+\))\}))</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>variable.tcl</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<key>word_lit__1</key>
|
|
||||||
<dict>
|
|
||||||
<key>patterns</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#braced_lit</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#embedded</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>include</key>
|
|
||||||
<string>#variable</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>match</key>
|
|
||||||
<string>(\\"|[^\x{0022}])</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>string.tcl</string>
|
|
||||||
<key>comment</key>
|
|
||||||
<string>All other quoted text.</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import { defineConfig } from "vite"
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
build: {
|
|
||||||
lib: {
|
|
||||||
entry: "./client/src/extension.ts",
|
|
||||||
formats: ["cjs", "es"],
|
|
||||||
fileName: "extension"
|
|
||||||
},
|
|
||||||
rollupOptions: {
|
|
||||||
external: ["vscode"]
|
|
||||||
},
|
|
||||||
sourcemap: true,
|
|
||||||
outDir: "client/out/src"
|
|
||||||
},
|
|
||||||
plugins: []
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user