# HG changeset patch # User Aziz K?ksal # Date 1190572332 -7200 # Node ID e2529923a0cb6f7c8cea552cb230ae3a903abd0b # Parent fe46b5ea7a1810c7646eb7443ed3be075eed69e2 Added two error messages. diff -r fe46b5ea7a18 -r e2529923a0cb trunk/src/dil/Messages.d --- a/trunk/src/dil/Messages.d Sun Sep 23 18:42:36 2007 +0200 +++ b/trunk/src/dil/Messages.d Sun Sep 23 20:32:12 2007 +0200 @@ -62,6 +62,8 @@ OutContract, MissingLinkageType, UnrecognizedLinkageType, + ExpectedBaseClasses, + BaseClassInForwardDeclaration, // Help messages: HelpMain, diff -r fe46b5ea7a18 -r e2529923a0cb trunk/src/dil/Parser.d --- a/trunk/src/dil/Parser.d Sun Sep 23 18:42:36 2007 +0200 +++ b/trunk/src/dil/Parser.d Sun Sep 23 20:32:12 2007 +0200 @@ -860,8 +860,6 @@ moduleFQNs ~= moduleFQN; moduleAliases ~= moduleAlias; - if (token.type == T.Colon) - break; if (token.type != T.Comma) break; nT(); @@ -980,8 +978,8 @@ if (token.type == T.Semicolon) { - //if (bases.length != 0) - // TODO: Error: bases classes are not allowed in forward declarations. + if (bases.length != 0) + error(MID.BaseClassInForwardDeclaration); nT(); } else if (token.type == T.LBrace) @@ -1017,7 +1015,7 @@ case T.Package: prot = Protection.Package; break; case T.Public: /*prot = Protection.Public;*/ break; default: - // TODO: issue error msg + error(MID.ExpectedBaseClasses, token.srcText); return bases; } nT(); // Skip protection attribute. @@ -1056,8 +1054,8 @@ if (token.type == T.Semicolon) { - //if (bases.length != 0) - // TODO: error: base classes are not allowed in forward declarations. + if (bases.length != 0) + error(MID.BaseClassInForwardDeclaration); nT(); } else if (token.type == T.LBrace) diff -r fe46b5ea7a18 -r e2529923a0cb trunk/src/lang_de.d --- a/trunk/src/lang_de.d Sun Sep 23 18:42:36 2007 +0200 +++ b/trunk/src/lang_de.d Sun Sep 23 20:32:12 2007 +0200 @@ -60,6 +60,8 @@ "der 'out'-Vertrag der Funktion wurde bereits geparsed.", "es wurde kein Verbindungstyp angegeben.", "unbekannter Verbindungstyp '{0}'; gültig sind C, C++, D, Windows, Pascal und System.", + "erwartete eine oder mehrere Basisklassen, nicht '{0}'.", + "Basisklassen sind in Vorwärtsdeklarationen nicht erlaubt.", // Help messages: `dil v{0} diff -r fe46b5ea7a18 -r e2529923a0cb trunk/src/lang_en.d --- a/trunk/src/lang_en.d Sun Sep 23 18:42:36 2007 +0200 +++ b/trunk/src/lang_en.d Sun Sep 23 20:32:12 2007 +0200 @@ -60,6 +60,8 @@ "the functions 'out' contract was already parsed.", "no linkage type was specified.", "unrecognized linkage type '{0}'; valid types are C, C++, D, Windows, Pascal und System.", + "expected one or more base classes, not '{0}'.", + "base classes are not allowed in forward declarations.", // Help messages: `dil v{0} diff -r fe46b5ea7a18 -r e2529923a0cb trunk/src/lang_fi.d --- a/trunk/src/lang_fi.d Sun Sep 23 18:42:36 2007 +0200 +++ b/trunk/src/lang_fi.d Sun Sep 23 20:32:12 2007 +0200 @@ -60,6 +60,8 @@ "funktion loppuehto jäsennettiin jo.", "linkitystyyppiä ei määritelty.", "tunnistamaton linkitystyyppi '{0}'; sallittuja tyyppejä ovat C, C++, D, Windows, Pascal ja System.", + "expected one or more base classes, not '{0}'.", // TODO: translate + "base classes are not allowed in forward declarations.", // TODO: translate // Help messages: `dil v{0} diff -r fe46b5ea7a18 -r e2529923a0cb trunk/src/lang_tr.d --- a/trunk/src/lang_tr.d Sun Sep 23 18:42:36 2007 +0200 +++ b/trunk/src/lang_tr.d Sun Sep 23 20:32:12 2007 +0200 @@ -60,6 +60,8 @@ "fonksiyonun 'out' kontratı daha önceden ayrıştırılmış.", "bağlantı tüp (linkage type) belirtilmedi.", "bilinmeyen bağlantı tüpü (linkage type) '{0}'; geçerli olanlar C, C++, D, Windows, Pascal ve System.", + "expected one or more base classes, not '{0}'.", // TODO: translate + "base classes are not allowed in forward declarations.", // TODO: translate // Help messages: `dil v{0}