rename none to null

This commit is contained in:
2026-07-21 22:59:51 +02:00
parent 1619ea98a3
commit 402871ef7a
44 changed files with 3771 additions and 3767 deletions
+3 -3
View File
@@ -461,7 +461,7 @@ module.exports = grammar({
$.multiline_string,
$.character,
$.boolean,
$.none,
$.null,
$.undefined,
),
@@ -644,7 +644,7 @@ module.exports = grammar({
)),
boolean: _ => choice('true', 'false'),
none: _ => 'none',
null: _ => 'null',
undefined: _ => 'undefined',
sink: _ => '_',
@@ -653,7 +653,7 @@ module.exports = grammar({
alias(choice(
'test', 'func', 'c_func', 'struct', 'c_struct', 'opaque', 'union', 'enum',
'distinct', 'alias', 'import', 'hide', 'return', 'try', 'catch', 'mut',
'none', 'undefined', 'orelse', 'and', 'or', 'xor', 'if', 'while', 'for',
'null', 'undefined', 'orelse', 'and', 'or', 'xor', 'if', 'while', 'for',
'expand', 'break', 'continue', 'defer', 'errdefer', 'yield', 'match', 'else',
'true', 'false',
'void', 'type', 'anyopaque', 'bool', 'int', 'uint', 'float', 'range',
+1 -1
View File
@@ -16,7 +16,7 @@
(boolean) @constant.builtin
[
(none)
(null)
(undefined)
] @constant.builtin
+4 -4
View File
@@ -3213,7 +3213,7 @@
},
{
"type": "SYMBOL",
"name": "none"
"name": "null"
},
{
"type": "SYMBOL",
@@ -4999,9 +4999,9 @@
}
]
},
"none": {
"null": {
"type": "STRING",
"value": "none"
"value": "null"
},
"undefined": {
"type": "STRING",
@@ -5092,7 +5092,7 @@
},
{
"type": "STRING",
"value": "none"
"value": "null"
},
{
"type": "STRING",
+3 -3
View File
@@ -840,7 +840,7 @@
"named": true
},
{
"type": "none",
"type": "null",
"named": true
},
{
@@ -1654,7 +1654,7 @@
}
},
{
"type": "none",
"type": "null",
"named": true,
"fields": {}
},
@@ -2925,7 +2925,7 @@
"named": false
},
{
"type": "none",
"type": "null",
"named": false
},
{
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -211,7 +211,7 @@ main func() void {
Intrinsic type construction
==================
Generated :: alias struct_type!(.auto, {"value"}, {i32}, {none})
Generated :: alias struct_type!(.auto, {"value"}, {i32}, {null})
---
@@ -238,7 +238,7 @@ Generated :: alias struct_type!(.auto, {"value"}, {i32}, {none})
(expression
(tuple_literal
(expression
(none))))))))))
(null))))))))))
==================
Errdefer
+1 -1
View File
@@ -20,5 +20,5 @@ clear func($K, $V type) void {
# ^ operator
}
Generated :: alias struct_type!(.auto, {"value"}, {i32}, {none})
Generated :: alias struct_type!(.auto, {"value"}, {i32}, {null})
# ^^^^^^^^^^^^ function.builtin