aboutsummaryrefslogtreecommitdiff
path: root/editors/vscode
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 09:39:22 +0000
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 09:39:22 +0000
commit6bb3d79cbd853601623095b497a1807489c3ef6e (patch)
tree188bc9ceb6d6db1670427f4355529eb8d46d1494 /editors/vscode
parenttodo: record the reverted unchecked trial and what it showed (diff)
add c-style typedef and a built-in string alias
typedef T name; binds name to the type record of T, at the top level or in a function (scoped to its block). string is a built-in alias for char*. A type name straight before , or ) in a parameter list is the parameter's name, so fn f(string) still works. The language server shows typedef T name; on hover and highlights typedef as a keyword.
Diffstat (limited to 'editors/vscode')
-rw-r--r--editors/vscode/syntaxes/zc.tmLanguage.json2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/vscode/syntaxes/zc.tmLanguage.json b/editors/vscode/syntaxes/zc.tmLanguage.json
index 36f1c63..6f76e03 100644
--- a/editors/vscode/syntaxes/zc.tmLanguage.json
+++ b/editors/vscode/syntaxes/zc.tmLanguage.json
@@ -87,7 +87,7 @@
},
{
"name": "keyword.declaration.zc",
- "match": "\\b(fn|let|struct|type|enum|const|enhance|micro|vm)\\b"
+ "match": "\\b(fn|let|struct|type|typedef|enum|const|enhance|micro|vm)\\b"
},
{
"name": "keyword.other.zc",