From 4d61a07d583e2a79d84fcf16bb5df83c3dce446e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 4 Nov 2006 18:58:27 +0000 Subject: [PATCH] --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40141 --- sourcepawn/compiler/sc1.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 656d9297..3f6d6cea 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -2599,7 +2599,7 @@ static void dofuncenum(void) int l = lex(&val,&str); if (l != tSYMBOL) { - /* Incomprehensible but it works for now! */ + /* Error should be: "expected tag name identifier" */ error(57); } @@ -2612,6 +2612,7 @@ static void dofuncenum(void) /* Another bad one... */ if (!(cur->value & FUNCTAG)) { + /* Error should be: "function enumeration requires unique tag" */ error(213); } break; @@ -2641,7 +2642,7 @@ static void dofuncenum(void) } else if (l == tPUBLIC) { func.type = uPUBLIC; } else { - error(1, "[forward,public]", str); + error(1, "-forward,public-", str); } needtoken('('); do @@ -2732,7 +2733,8 @@ static void dofuncenum(void) arg->ommittable = TRUE; func.ommittable = TRUE; } else if (func.ommittable) { - /* :TODO: ERROR HERE! */ + /* Error should be: "cannot have required parameters after optional parameters" */ + error(1); } func.argcount++; } else if (l == tELLIPS) {