Skip to content

Commit

Permalink
Remove TODO (converted to comment on ziglang#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
hryx committed May 12, 2019
1 parent c5b24b7 commit 0daf105
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions std/zig/parse.zig
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,6 @@ fn parseFnProto(arena: *Allocator, it: *TokenIterator, tree: *Tree) !?*Node {
.ExpectedReturnType = AstError.ExpectedReturnType{ .token = it.index },
});

// TODO: Based on this rule, `!var` is an acceptable return type, but there is no usage
// or coverage of that yet. The grammar also does not include `Keyword_var` as a choice
// for PrimaryTypeExpr, but the iterative stage2 parser treats it as one, which actually
// makes more sense given the return type rule above. Clarify this with @Hejsil.
// Alternative rule, if `var` were to be included in PrimaryTypeExpr (I think):
//
// - FnProto <- FnCC? KEYWORD_fn IDENTIFIER? LPAREN ParamDeclList RPAREN ByteAlign? LinkSection? EXCLAMATIONMARK? (KEYWORD_var / TypeExpr)
// + FnProto <- FnCC? KEYWORD_fn IDENTIFIER? LPAREN ParamDeclList RPAREN ByteAlign? LinkSection? EXCLAMATIONMARK? TypeExpr
const return_type = if (exclamation_token != null)
Node.FnProto.ReturnType{
.InferErrorSet = return_type_expr,
Expand Down

0 comments on commit 0daf105

Please sign in to comment.