From b311540b1672129e87a7249650a19cf11d2fccef Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 31 Aug 2019 14:48:56 +0100 Subject: Make `require_results` an attribute rather than a suffix tag for procedures --- src/parser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 34a42ba3d..e92489020 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1855,7 +1855,7 @@ Ast *parse_operand(AstFile *f, bool lhs) { } if (tags != 0) { - syntax_error(token, "A procedure type cannot have tags"); + syntax_error(token, "A procedure type cannot have suffix tags"); } return type; @@ -2828,6 +2828,10 @@ Ast *parse_proc_type(AstFile *f, Token proc_token) { u64 tags = 0; parse_proc_tags(f, &tags); + if ((tags & ProcTag_require_results) != 0) { + syntax_error(f->curr_token, "#require_results has now been replaced as an attribute @(require_results) on the declaration"); + tags &= ~ProcTag_require_results; + } bool is_generic = false; -- cgit v1.2.3