std.zig: this is no longer a keyword

This commit is contained in:
Andrew Kelley 2019-03-10 15:55:38 -04:00
parent fa9fcab620
commit 918dbd4551
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
6 changed files with 0 additions and 30 deletions

View File

@ -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]);

View File

@ -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);

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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,