| ... | @@ -347,13 +347,10 @@ pub const Module = struct { | ... | @@ -347,13 +347,10 @@ pub const Module = struct { |
| 347 | const fn_proto = @fieldParentPtr(ast.Node.FnProto, "base", decl); | 347 | const fn_proto = @fieldParentPtr(ast.Node.FnProto, "base", decl); |
| 348 | | 348 | |
| 349 | const name = if (fn_proto.name_token) |name_token| tree.tokenSlice(name_token) else { | 349 | const name = if (fn_proto.name_token) |name_token| tree.tokenSlice(name_token) else { |
| 350 | @panic("TODO add compile error"); | 350 | try self.addCompileError(parsed_file, errmsg.Span{ |
| 351 | //try self.addCompileError( | 351 | .first = fn_proto.fn_token, |
| 352 | // parsed_file, | 352 | .last = fn_proto.fn_token + 1, |
| 353 | // fn_proto.fn_token, | 353 | }, "missing function name"); |
| 354 | // fn_proto.fn_token + 1, | | |
| 355 | // "missing function name", | | |
| 356 | //); | | |
| 357 | continue; | 354 | continue; |
| 358 | }; | 355 | }; |
| 359 | | 356 | |