Skip to content

Commit 45db32b

Browse files
committed
Updated to Zig v0.12.0
1 parent 094f66b commit 45db32b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+4329
-775
lines changed

Base/.vscode/Base.code-workspace

Lines changed: 89 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,94 @@
3434
"workbench.colorTheme": "Default Dark+",
3535
"workbench.startupEditor": "none",
3636
"workbench.colorCustomizations": {
37-
"statusBar.background" : "#1A1A1A",
38-
"statusBar.noFolderBackground" : "#212121",
39-
"statusBar.debuggingBackground": "#263238"
37+
"statusBar.background" : "#1A1A1A",
38+
"statusBar.noFolderBackground" : "#212121",
39+
"statusBar.debuggingBackground": "#263238",
40+
"editorBracketHighlight.foreground1": "#888888",
41+
"editorBracketHighlight.foreground2": "#686888",
42+
"editorBracketHighlight.foreground3": "#688868",
43+
"editorBracketHighlight.foreground4": "#886868",
44+
"editorBracketHighlight.foreground5": "#686868",
45+
},
46+
"editor.tokenColorCustomizations": {
47+
"comments": "#546E7A",
48+
"functions": "#DFAB4B",
49+
"keywords": "#367CB6",
50+
"numbers": "#CE9178",
51+
"strings": "#CE9178",
52+
"types": "#2EA990",
53+
"variables": "#7CBCDE",
54+
55+
"[Default Dark+]": {
56+
"textMateRules": [
57+
{
58+
"scope": [
59+
"other",
60+
"source",
61+
"keyword.operator",
62+
"keyword.operator.noexcept",
63+
"punctuation",
64+
"punctuation.dot",
65+
"punctuation.comma",
66+
"punctuation.definitions",
67+
"punctuation.definition.comment",
68+
"punctuation.definition.tag",
69+
"punctuation.definition.tag.html",
70+
"punctuation.definition.tag.begin.html",
71+
"punctuation.definition.tag.end.html",
72+
"punctuation.section.embedded",
73+
"punctuation.separator",
74+
"punctuation.separator.inheritance.php",
75+
],
76+
"settings": {
77+
"foreground": "#758E68",
78+
"fontStyle": "",
79+
}
80+
},
81+
{
82+
"scope": [
83+
"comment",
84+
],
85+
"settings": {
86+
"fontStyle": "italic",
87+
}
88+
},
89+
{
90+
"scope": [
91+
"keyword",
92+
"keyword.control",
93+
"keyword.other",
94+
"keyword.other.template",
95+
"keyword.other.substitution",
96+
"keyword.other.unit",
97+
"storage",
98+
"storage.type",
99+
"storage.modifier",
100+
"keywordLiteral",
101+
"keyword.literal",
102+
"keyword.constant.default",
103+
],
104+
"settings": {
105+
"fontStyle": "italic",
106+
"foreground": "#367CB6"
107+
}
108+
},
109+
{
110+
"scope": [
111+
"support.class",
112+
"support.type",
113+
"entity.name.type",
114+
"entity.name.namespace",
115+
"entity.other.attribute",
116+
"entity.name.scope-resolution",
117+
"entity.name.class",
118+
],
119+
"settings": {
120+
"foreground": "#2EA990"
121+
}
122+
},
123+
],
124+
},
40125
},
41126
"editor.tabSize": 2,
42127
"editor.fontSize": 16,
@@ -45,7 +130,7 @@
45130
"editor.autoSurround": "never",
46131
"editor.autoClosingQuotes": "never",
47132
"editor.detectIndentation": false,
48-
"editor.lightbulb.enabled": false,
133+
"editor.lightbulb.enabled": "off",
49134
"workbench.editor.focusRecentEditorAfterClose": false,
50135
"workbench.panel.defaultLocation": "left",
51136
"workbench.panel.opensMaximized": "never",

Base/main.zig

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,37 @@
1+
//!zig-autodoc-section: Base.Main
2+
//! Base\\main.zig :
3+
//! Template for a console program.
4+
15
const std = @import("std");
26

7+
/// Main function
8+
pub fn main() void {
9+
print("All your {s} are belong to us.\n", .{"codebase"});
10+
}
11+
12+
// ============================================================================
13+
// Helpers
14+
//
15+
16+
/// Print to standard out.
317
fn print(comptime fmt: []const u8, args: anytype) void {
4-
// debug.print output to StdErr ( is a shortcut to
18+
// debug.print output to StdErr ( is a shortcut to
519
// std.io.getStdErr() ), changed to a custom warper
620
// to StdOut ignoring any error.
721
std.io.getStdOut().writer().print(fmt, args) catch unreachable;
822
}
923

10-
pub fn main() void {
11-
print("All your {s} are belong to us.\n", .{"codebase"});
24+
/// Print line directly when text don't need formating.
25+
fn printLine(line: []const u8) void {
26+
print("{s}\n", .{ line });
1227
}
1328

1429

15-
//
16-
// Tests section
30+
// ============================================================================
31+
// Tests
1732
//
1833
test " Print" {
1934
print("\nTest print(): Hello {s}!", .{" world"});
2035
try std.testing.expect(true);
2136
print("\nNo error is good.\n", .{});
22-
}
37+
}

BaseDX11/.vscode/BaseDX11.code-workspace

Lines changed: 90 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,94 @@
3434
"workbench.colorTheme": "Default Dark+",
3535
"workbench.startupEditor": "none",
3636
"workbench.colorCustomizations": {
37-
"statusBar.background" : "#1A1A1A",
38-
"statusBar.noFolderBackground" : "#212121",
39-
"statusBar.debuggingBackground": "#263238"
37+
"statusBar.background" : "#1A1A1A",
38+
"statusBar.noFolderBackground" : "#212121",
39+
"statusBar.debuggingBackground": "#263238",
40+
"editorBracketHighlight.foreground1": "#888888",
41+
"editorBracketHighlight.foreground2": "#686888",
42+
"editorBracketHighlight.foreground3": "#688868",
43+
"editorBracketHighlight.foreground4": "#886868",
44+
"editorBracketHighlight.foreground5": "#686868",
45+
},
46+
"editor.tokenColorCustomizations": {
47+
"comments": "#546E7A",
48+
"functions": "#DFAB4B",
49+
"keywords": "#367CB6",
50+
"numbers": "#CE9178",
51+
"strings": "#CE9178",
52+
"types": "#2EA990",
53+
"variables": "#7CBCDE",
54+
55+
"[Default Dark+]": {
56+
"textMateRules": [
57+
{
58+
"scope": [
59+
"other",
60+
"source",
61+
"keyword.operator",
62+
"keyword.operator.noexcept",
63+
"punctuation",
64+
"punctuation.dot",
65+
"punctuation.comma",
66+
"punctuation.definitions",
67+
"punctuation.definition.comment",
68+
"punctuation.definition.tag",
69+
"punctuation.definition.tag.html",
70+
"punctuation.definition.tag.begin.html",
71+
"punctuation.definition.tag.end.html",
72+
"punctuation.section.embedded",
73+
"punctuation.separator",
74+
"punctuation.separator.inheritance.php",
75+
],
76+
"settings": {
77+
"foreground": "#758E68",
78+
"fontStyle": "",
79+
}
80+
},
81+
{
82+
"scope": [
83+
"comment",
84+
],
85+
"settings": {
86+
"fontStyle": "italic",
87+
}
88+
},
89+
{
90+
"scope": [
91+
"keyword",
92+
"keyword.control",
93+
"keyword.other",
94+
"keyword.other.template",
95+
"keyword.other.substitution",
96+
"keyword.other.unit",
97+
"storage",
98+
"storage.type",
99+
"storage.modifier",
100+
"keywordLiteral",
101+
"keyword.literal",
102+
"keyword.constant.default",
103+
],
104+
"settings": {
105+
"fontStyle": "italic",
106+
"foreground": "#367CB6"
107+
}
108+
},
109+
{
110+
"scope": [
111+
"support.class",
112+
"support.type",
113+
"entity.name.type",
114+
"entity.name.namespace",
115+
"entity.other.attribute",
116+
"entity.name.scope-resolution",
117+
"entity.name.class",
118+
],
119+
"settings": {
120+
"foreground": "#2EA990"
121+
}
122+
},
123+
],
124+
},
40125
},
41126
"editor.tabSize": 2,
42127
"editor.fontSize": 16,
@@ -45,7 +130,7 @@
45130
"editor.autoSurround": "never",
46131
"editor.autoClosingQuotes": "never",
47132
"editor.detectIndentation": false,
48-
"editor.lightbulb.enabled": false,
133+
"editor.lightbulb.enabled": "off",
49134
"workbench.editor.focusRecentEditorAfterClose": false,
50135
"workbench.panel.defaultLocation": "left",
51136
"workbench.panel.opensMaximized": "never",
@@ -106,4 +191,4 @@
106191
"pkief.material-icon-theme"
107192
]
108193
}
109-
}
194+
}

0 commit comments

Comments
 (0)