mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
std.zig: this is no longer a keyword
This commit is contained in:
parent
fa9fcab620
commit
918dbd4551
@ -795,7 +795,6 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
|
||||
std.zig.Token.Id.Keyword_null,
|
||||
std.zig.Token.Id.Keyword_true,
|
||||
std.zig.Token.Id.Keyword_false,
|
||||
std.zig.Token.Id.Keyword_this,
|
||||
=> {
|
||||
try out.write("<span class=\"tok-null\">");
|
||||
try writeEscaped(out, src[token.start..token.end]);
|
||||
|
||||
@ -1151,7 +1151,6 @@ pub const Builder = struct {
|
||||
ast.Node.Id.BoolLiteral => return error.Unimplemented,
|
||||
ast.Node.Id.NullLiteral => return error.Unimplemented,
|
||||
ast.Node.Id.UndefinedLiteral => return error.Unimplemented,
|
||||
ast.Node.Id.ThisLiteral => return error.Unimplemented,
|
||||
ast.Node.Id.Unreachable => return error.Unimplemented,
|
||||
ast.Node.Id.Identifier => {
|
||||
const identifier = @fieldParentPtr(ast.Node.Identifier, "base", node);
|
||||
|
||||
@ -302,7 +302,6 @@ pub const Node = struct {
|
||||
BoolLiteral,
|
||||
NullLiteral,
|
||||
UndefinedLiteral,
|
||||
ThisLiteral,
|
||||
Unreachable,
|
||||
Identifier,
|
||||
GroupedExpression,
|
||||
@ -1997,23 +1996,6 @@ pub const Node = struct {
|
||||
}
|
||||
};
|
||||
|
||||
pub const ThisLiteral = struct {
|
||||
base: Node,
|
||||
token: TokenIndex,
|
||||
|
||||
pub fn iterate(self: *ThisLiteral, index: usize) ?*Node {
|
||||
return null;
|
||||
}
|
||||
|
||||
pub fn firstToken(self: *const ThisLiteral) TokenIndex {
|
||||
return self.token;
|
||||
}
|
||||
|
||||
pub fn lastToken(self: *const ThisLiteral) TokenIndex {
|
||||
return self.token;
|
||||
}
|
||||
};
|
||||
|
||||
pub const AsmOutput = struct {
|
||||
base: Node,
|
||||
lbracket: TokenIndex,
|
||||
|
||||
@ -2563,10 +2563,6 @@ pub fn parse(allocator: *mem.Allocator, source: []const u8) !ast.Tree {
|
||||
_ = try createToCtxLiteral(arena, opt_ctx, ast.Node.NullLiteral, token.index);
|
||||
continue;
|
||||
},
|
||||
Token.Id.Keyword_this => {
|
||||
_ = try createToCtxLiteral(arena, opt_ctx, ast.Node.ThisLiteral, token.index);
|
||||
continue;
|
||||
},
|
||||
Token.Id.Keyword_var => {
|
||||
_ = try createToCtxLiteral(arena, opt_ctx, ast.Node.VarType, token.index);
|
||||
continue;
|
||||
|
||||
@ -880,10 +880,6 @@ fn renderExpression(
|
||||
const null_literal = @fieldParentPtr(ast.Node.NullLiteral, "base", base);
|
||||
return renderToken(tree, stream, null_literal.token, indent, start_col, space);
|
||||
},
|
||||
ast.Node.Id.ThisLiteral => {
|
||||
const this_literal = @fieldParentPtr(ast.Node.ThisLiteral, "base", base);
|
||||
return renderToken(tree, stream, this_literal.token, indent, start_col, space);
|
||||
},
|
||||
ast.Node.Id.Unreachable => {
|
||||
const unreachable_node = @fieldParentPtr(ast.Node.Unreachable, "base", base);
|
||||
return renderToken(tree, stream, unreachable_node.token, indent, start_col, space);
|
||||
|
||||
@ -52,7 +52,6 @@ pub const Token = struct {
|
||||
Keyword{ .bytes = "suspend", .id = Id.Keyword_suspend },
|
||||
Keyword{ .bytes = "switch", .id = Id.Keyword_switch },
|
||||
Keyword{ .bytes = "test", .id = Id.Keyword_test },
|
||||
Keyword{ .bytes = "this", .id = Id.Keyword_this },
|
||||
Keyword{ .bytes = "threadlocal", .id = Id.Keyword_threadlocal },
|
||||
Keyword{ .bytes = "true", .id = Id.Keyword_true },
|
||||
Keyword{ .bytes = "try", .id = Id.Keyword_try },
|
||||
@ -183,7 +182,6 @@ pub const Token = struct {
|
||||
Keyword_suspend,
|
||||
Keyword_switch,
|
||||
Keyword_test,
|
||||
Keyword_this,
|
||||
Keyword_threadlocal,
|
||||
Keyword_true,
|
||||
Keyword_try,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user