MCP-Drift-State-Tracker/language_profiles.json

299 lines
6.8 KiB
JSON
Executable File

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MCP Drift State Tracker — Language Profiles",
"description": "Data-driven lexical profiles for multi-language code parsing. Extension resolution uses the _dispatch table for O(1) lookup. Duplicate profiles resolve through _aliases. Stub patterns fall back to _stubDefaults when a profile omits an explicit stubs array.",
"_stubDefaults": [
"TODO",
"FIXME",
"HACK",
"XXX",
"pass",
"notimplemented",
"not implemented",
"no-op",
"noop",
"placeholder",
"stub",
"raise notimplementederror"
],
"_aliases": {
".zsh": ".sh",
".ps1": ".sh",
".exs": ".ex",
".ads": ".adb",
".cmd": ".bat",
".hack": ".php"
},
"_dispatch": {
".js": {
"category": "brace",
"key": "_cstyle"
},
".jsx": {
"category": "brace",
"key": "_cstyle"
},
".ts": {
"category": "brace",
"key": "_cstyle"
},
".tsx": {
"category": "brace",
"key": "_cstyle"
},
".c": {
"category": "brace",
"key": "_cstyle"
},
".cpp": {
"category": "brace",
"key": "_cstyle"
},
".h": {
"category": "brace",
"key": "_cstyle"
},
".hpp": {
"category": "brace",
"key": "_cstyle"
},
".java": {
"category": "brace",
"key": "_cstyle"
},
".cs": {
"category": "brace",
"key": "_cstyle"
},
".ec": {
"category": "brace",
"key": "_cstyle"
},
".eh": {
"category": "brace",
"key": "_cstyle"
},
".pike": {
"category": "brace",
"key": "_cstyle"
},
".pmod": {
"category": "brace",
"key": "_cstyle"
},
".kt": {
"category": "brace",
"key": "_cstyle"
},
".kts": {
"category": "brace",
"key": "_cstyle"
},
".swift": {
"category": "brace",
"key": "_cstyle"
},
".dart": {
"category": "brace",
"key": "_cstyle"
},
".r": {
"category": "brace",
"key": "_cstyle"
},
".rs": {
"category": "brace",
"key": ".rs"
},
".go": {
"category": "brace",
"key": ".go"
},
".php": {
"category": "brace",
"key": ".php"
},
".sh": {
"category": "brace",
"key": ".sh"
},
".jl": {
"category": "blockend",
"key": ".jl"
},
".lua": {
"category": "blockend",
"key": ".lua"
},
".ex": {
"category": "blockend",
"key": ".ex"
},
".adb": {
"category": "blockend",
"key": ".adb"
},
".au3": {
"category": "blockend",
"key": ".au3"
},
".vbs": {
"category": "blockend",
"key": ".vbs"
},
".bat": {
"category": "sequential",
"key": ".bat"
},
".sql": {
"category": "sequential",
"key": ".sql"
},
".mojo": {
"category": "indent",
"key": ".mojo"
},
".hs": {
"category": "indent",
"key": ".hs"
},
".elm": {
"category": "indent",
"key": ".elm"
}
},
"globalIgnoreDirs": [
".git",
".venv",
"venv",
"__pycache__",
"node_modules",
"target",
"dist",
"build",
"out",
".cargo",
".rustup",
"obj",
"bin",
".idea",
".vscode",
".mcp_drift_state.json"
],
"stateFileName": ".mcp_drift_state.json",
"cStyleDefault": {
"imp": "^(?:import|require|#include)\\s+.+",
"fn": "(?:public|private|protected|static|async|fun|func|function)?\\s*([a-zA-Z_0-9]+)\\s*\\([^)]*\\)\\s*(?:\\{|->|:)?",
"cls": "^\\s*(?:export\\s+)?(?:class|interface|struct|enum)\\s+([a-zA-Z_0-9]+)",
"dec": "^\\s*@([a-zA-Z_0-9]+)"
},
"braceProfiles": {
".rs": {
"imp": "^\\s*(?:pub\\s+)?use\\s+([^;]+);",
"fn": "(?:pub\\s+)?(?:async\\s+)?fn\\s+([a-zA-Z_0-9]+)",
"cls": "^\\s*(?:pub\\s+)?(?:struct|enum|trait)\\s+([a-zA-Z_0-9]+)",
"dec": "^\\s*#\\[([^\\]]+)\\]"
},
".go": {
"imp": "^\\s*import\\s+(?:\\([^\\)]+\\)|\"[^\"]+\")",
"fn": "^func\\s+(?:\\([^)]+\\)\\s+)?([a-zA-Z_0-9]+)",
"cls": "^\\s*type\\s+([a-zA-Z_0-9]+)\\s+struct",
"dec": "^\\s*//\\s*@([a-zA-Z_0-9]+)"
},
".php": {
"imp": "^\\s*(?:use|require|include)(?:\\s+once)?\\s+([^;]+);",
"fn": "(?:public|private|protected|static)?\\s*function\\s+([a-zA-Z_0-9]+)",
"cls": "^\\s*(?:abstract\\s+)?class\\s+([a-zA-Z_0-9]+)",
"dec": "^\\s*<<([^>>]+)>>"
},
".sh": {
"imp": "^\\s*(?:\\.|source)\\s+.+",
"fn": "(?:function\\s+)?([a-zA-Z_0-9\\-]+)\\s*\\(\\s*\\)\\s*\\{?|^\\s*function\\s+([a-zA-Z_0-9\\-]+)",
"cls": "^\\s*class\\s+([a-zA-Z_0-9]+)",
"dec": "^\\s*#\\s*@([a-zA-Z_0-9]+)"
}
},
"blockEndProfiles": {
".jl": {
"start": "^\\s*(?:function|macro|mutable\\s+struct)\\s+([a-zA-Z_0-9!]+)",
"end": "^\\s*end\\b",
"inc": "\\b(if|for|while|let|do|try|quote)\\b"
},
".lua": {
"start": "^\\s*(?:local\\s+)?function\\s+([a-zA-Z_0-9\\.:]+)",
"end": "^\\s*end\\b",
"inc": "\\b(if|for|while|do)\\b"
},
".ex": {
"start": "^\\s*(?:def|defp|defmacro)\\s+([a-zA-Z_0-9!]+)",
"end": "^\\s*end\\b",
"inc": "\\b(if|case|cond|unless|try)\\b.*\\bdo\\b"
},
".adb": {
"start": "^\\s*(?:procedure|function)\\s+([a-zA-Z_0-9]+)",
"end": "^\\s*end\\s+[a-zA-Z_0-9]+;",
"inc": "\\b(if|loop|case|begin)\\b"
},
".au3": {
"start": "^\\s*(?:Func)\\s+([a-zA-Z_0-9]+)",
"end": "^\\s*EndFunc\\b",
"inc": "^\\s*(If|While|For|Select|Switch)\\b"
},
".vbs": {
"start": "^\\s*(?:Function|Sub)\\s+([a-zA-Z_0-9]+)",
"end": "^\\s*End\\s+(?:Function|Sub)\\b",
"inc": "^\\s*(If|For|While|Do)\\b",
"flags": "i"
}
},
"sequentialProfiles": {
".bat": {
"start": "^\\s*:([a-zA-Z_0-9\\-]+)",
"end": "^\\s*(?:goto\\s+:eof|exit\\b)",
"stubs": [
"rem todo",
"rem fixme",
"echo placeholder"
],
"flags": "i"
},
".sql": {
"start": "(?:create\\s+(?:or\\s+replace\\s+)?(?:procedure|function|view))\\s+([a-zA-Z_0-9\\.]+)",
"end": "^\\s*end\\s*[a-zA-Z_0-9]*\\s*;",
"stubs": [
"-- todo",
"-- fixme",
"return null",
"raise notice"
],
"flags": "i"
}
},
"indentationProfiles": {
".mojo": {
"sig": "^\\s*(?:fn|def)\\s+([a-zA-Z_0-9]+)\\s*\\(",
"stubs": [
"pass",
"raise notimplementederror",
"todo"
]
},
".hs": {
"sig": "^([a-zA-Z_0-9]+)\\s*::\\s+.*|^\\s*([a-zA-Z_0-9]+)\\s*=",
"stubs": [
"undefined",
"todo",
"error "
]
},
".elm": {
"sig": "^([a-zA-Z_0-9]+)\\s*::\\s+.*|^\\s*([a-zA-Z_0-9]+)\\s*=",
"stubs": [
"undefined",
"todo",
"error "
]
}
}
}