aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/decl.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-24 20:28:46 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-11-24 20:28:46 -0500
commit34b1ebefaab2e8f5c322bc96388bb4fefec31027 (patch)
treed2a9909de0a9e19c495fcaaccfaa2c31f5f9169b /src-self-hosted/decl.zig
parentb9f88c3552c0ac892aa6dba7ed8518a0aee51305 (diff)
parent8309b6188d849c5d4c27c086b7759566d9f86716 (diff)
downloadzig-34b1ebefaab2e8f5c322bc96388bb4fefec31027.tar.gz
zig-34b1ebefaab2e8f5c322bc96388bb4fefec31027.zip
Merge remote-tracking branch 'origin/master' into null-terminated-pointers
Diffstat (limited to 'src-self-hosted/decl.zig')
-rw-r--r--src-self-hosted/decl.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src-self-hosted/decl.zig b/src-self-hosted/decl.zig
index 1af06dea39..21a99729f5 100644
--- a/src-self-hosted/decl.zig
+++ b/src-self-hosted/decl.zig
@@ -29,7 +29,7 @@ pub const Decl = struct {
pub fn isExported(base: *const Decl, tree: *ast.Tree) bool {
switch (base.id) {
- Id.Fn => {
+ .Fn => {
const fn_decl = @fieldParentPtr(Fn, "base", base);
return fn_decl.isExported(tree);
},
@@ -39,7 +39,7 @@ pub const Decl = struct {
pub fn getSpan(base: *const Decl) errmsg.Span {
switch (base.id) {
- Id.Fn => {
+ .Fn => {
const fn_decl = @fieldParentPtr(Fn, "base", base);
const fn_proto = fn_decl.fn_proto;
const start = fn_proto.fn_token;
@@ -74,7 +74,7 @@ pub const Decl = struct {
// TODO https://github.com/ziglang/zig/issues/683 and then make this anonymous
pub const Val = union(enum) {
- Unresolved: void,
+ Unresolved,
Fn: *Value.Fn,
FnProto: *Value.FnProto,
};
@@ -83,7 +83,7 @@ pub const Decl = struct {
return if (self.fn_proto.extern_export_inline_token) |tok_index| x: {
const token = tree.tokens.at(tok_index);
break :x switch (token.id) {
- Token.Id.Extern => tree.tokenSlicePtr(token),
+ .Extern => tree.tokenSlicePtr(token),
else => null,
};
} else null;
@@ -92,7 +92,7 @@ pub const Decl = struct {
pub fn isExported(self: Fn, tree: *ast.Tree) bool {
if (self.fn_proto.extern_export_inline_token) |tok_index| {
const token = tree.tokens.at(tok_index);
- return token.id == Token.Id.Keyword_export;
+ return token.id == .Keyword_export;
} else {
return false;
}