From 89a29f17e2f83cdfc4f20d424bfce3e660ee5d11 Mon Sep 17 00:00:00 2001
From: Smite <1627283564@qq.com>
Date: Sun, 1 Feb 2026 17:58:04 +0800
Subject: [PATCH 1/5] fix: update error handling to use tilde for fault returns
---
libraries/tree_sitter.c3l/wrappers.c3 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libraries/tree_sitter.c3l/wrappers.c3 b/libraries/tree_sitter.c3l/wrappers.c3
index 0239ddf..a20178d 100644
--- a/libraries/tree_sitter.c3l/wrappers.c3
+++ b/libraries/tree_sitter.c3l/wrappers.c3
@@ -8,7 +8,7 @@ faultdef INCOMPATIBLE_LANGUAGE_VERSION;
fn TSParser*? new_with_language(TSLanguage* language) {
TSParser* parser = ts::parser_new();
- return ts::parser_set_language(parser, language) ? parser : INCOMPATIBLE_LANGUAGE_VERSION?;
+ return ts::parser_set_language(parser, language) ? parser : INCOMPATIBLE_LANGUAGE_VERSION~;
}
fn void delete(TSParser* parser) {
@@ -63,7 +63,7 @@ fn TSQuery*? new(TSLanguage* language, String query, uint* error_offset = null)
TSQueryError error_type;
TSQuery* result = ts::query_new(language, query.ptr, query.len, error_offset, &error_type);
if (!result) {
- return fault_from_error(error_type)?;
+ return fault_from_error(error_type)~;
}
return result;
}
@@ -94,7 +94,7 @@ fn TSQueryCapture? TSQueryMatch.get_capture(&match, String name, TSQuery* query)
}
}
- return NOT_FOUND?;
+ return NOT_FOUND~;
}
// Query Capture
From 8d8ef2a1e321e1b68f44c12742cd9666c1d1c8e2 Mon Sep 17 00:00:00 2001
From: Smite <1627283564@qq.com>
Date: Sun, 1 Feb 2026 18:36:01 +0800
Subject: [PATCH 2/5] feat: enhance error handling with tilde for fault returns
and update settings
---
.vscode/settings.json | 13 +++++++++++++
README.md | 4 ++++
libraries/opengl.c3l/opengl.c3i | 2 +-
libraries/webgpu.c3l/adapter.c3 | 2 +-
libraries/webgpu.c3l/instance.c3 | 2 +-
5 files changed, 20 insertions(+), 3 deletions(-)
create mode 100644 .vscode/settings.json
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..924f155
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,13 @@
+{
+ "editor.gotoLocation.alternativeDeclarationCommand": "editor.action.revealDefinition",
+ "editor.gotoLocation.alternativeDefinitionCommand": "editor.action.revealDefinition",
+ "editor.gotoLocation.alternativeTypeDefinitionCommand": "editor.action.revealDefinition",
+ "editor.selectionHighlight": false,
+ "files.autoSave": "onFocusChange",
+ "editor.suggest.snippetsPreventQuickSuggestions": false,
+ "editor.quickSuggestions": {
+ "other": "on",
+ "comments": "off",
+ "strings": "on"
+ }
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 418a89b..de58178 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,8 @@
# Vendor
+
+
+
+
This repository contains external libraries for use with C3.
### List of libraries
diff --git a/libraries/opengl.c3l/opengl.c3i b/libraries/opengl.c3l/opengl.c3i
index ff0592c..932b902 100644
--- a/libraries/opengl.c3l/opengl.c3i
+++ b/libraries/opengl.c3l/opengl.c3i
@@ -73,7 +73,7 @@ faultdef GL_INIT_FAILED;
macro int? init(GLLoadFn load)
{
int version = gl::load_gl_internal(load);
- if (version == 0) return GL_INIT_FAILED?;
+ if (version == 0) return GL_INIT_FAILED~;
return version;
}
diff --git a/libraries/webgpu.c3l/adapter.c3 b/libraries/webgpu.c3l/adapter.c3
index 5182327..16280fc 100644
--- a/libraries/webgpu.c3l/adapter.c3
+++ b/libraries/webgpu.c3l/adapter.c3
@@ -17,6 +17,6 @@ fn Device? Adapter.requestDevice(Adapter adapter, DeviceDescriptor* descriptor =
if(device) {
return device;
} else {
- return DEVICE_REQUEST_FAILED?;
+ return DEVICE_REQUEST_FAILED~;
}
}
diff --git a/libraries/webgpu.c3l/instance.c3 b/libraries/webgpu.c3l/instance.c3
index a2752e3..a74d835 100644
--- a/libraries/webgpu.c3l/instance.c3
+++ b/libraries/webgpu.c3l/instance.c3
@@ -18,6 +18,6 @@ fn Adapter? Instance.requestAdapter(Instance instance, RequestAdapterOptions* op
if(adapter) {
return adapter;
} else {
- return ADAPTER_REQUEST_FAILED?;
+ return ADAPTER_REQUEST_FAILED~;
}
}
From 07a9f5bc7b0fcdadf2a64bec2924ac6a076eb678 Mon Sep 17 00:00:00 2001
From: Smite <1627283564@qq.com>
Date: Sun, 1 Feb 2026 18:39:07 +0800
Subject: [PATCH 3/5] add .vscode to .gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index caf3d11..221daa9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,4 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf
+.vscode
\ No newline at end of file
From 8ca23bd912b7e268272be421e56e9b18967c3b36 Mon Sep 17 00:00:00 2001
From: Smite <1627283564@qq.com>
Date: Sun, 1 Feb 2026 18:43:25 +0800
Subject: [PATCH 4/5] chore: remove .vscode/settings.json file
---
.vscode/settings.json | 13 -------------
1 file changed, 13 deletions(-)
delete mode 100644 .vscode/settings.json
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index 924f155..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "editor.gotoLocation.alternativeDeclarationCommand": "editor.action.revealDefinition",
- "editor.gotoLocation.alternativeDefinitionCommand": "editor.action.revealDefinition",
- "editor.gotoLocation.alternativeTypeDefinitionCommand": "editor.action.revealDefinition",
- "editor.selectionHighlight": false,
- "files.autoSave": "onFocusChange",
- "editor.suggest.snippetsPreventQuickSuggestions": false,
- "editor.quickSuggestions": {
- "other": "on",
- "comments": "off",
- "strings": "on"
- }
-}
\ No newline at end of file
From ffdb541c04243fc64c63c101e41994d9b3af7059 Mon Sep 17 00:00:00 2001
From: Christoffer Lerno
Date: Sat, 7 Feb 2026 11:57:29 +0100
Subject: [PATCH 5/5] Update badge version in README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index de58178..0333505 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Vendor
-
+
This repository contains external libraries for use with C3.