From 6bb3d79cbd853601623095b497a1807489c3ef6e Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 09:39:22 +0000 Subject: 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. --- editors/vscode/syntaxes/zc.tmLanguage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editors/vscode') 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", -- cgit v1.2.3