From: Juerg Billeter Date: Fri, 18 Apr 2008 21:40:37 +0000 (+0000) Subject: don't report secondary syntax errors, fixes bug 511896 X-Git-Tag: VALA_0_3_1~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d23a9ee1c9573017b3df7790e6703c413c8730d0;p=platform%2Fupstream%2Fvala.git don't report secondary syntax errors, fixes bug 511896 2008-04-18 Juerg Billeter * vala/valaparser.vala: don't report secondary syntax errors, fixes bug 511896 svn path=/trunk/; revision=1256 --- diff --git a/ChangeLog b/ChangeLog index 42b2492..ec3f6fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-04-18 Jürg Billeter + * vala/valaparser.vala: don't report secondary syntax errors, + fixes bug 511896 + +2008-04-18 Jürg Billeter + * vala/valaclass.vala, gobject/valaccodegeneratorclass.vala: make sure that ref_function and unref_function of classes deriving from GTypeInstance are always initialized diff --git a/vala/valaparser.vala b/vala/valaparser.vala index d5f7157..f2e591c 100644 --- a/vala/valaparser.vala +++ b/vala/valaparser.vala @@ -1283,7 +1283,10 @@ public class Vala.Parser : CodeVisitor { var block = context.create_block (get_src_com (begin)); parse_statements (block); if (!accept (TokenType.CLOSE_BRACE)) { - Report.error (get_current_src (), "expected `}'"); + // only report error if it's not a secondary error + if (Report.get_errors () == 0) { + Report.error (get_current_src (), "expected `}'"); + } } return block; @@ -1724,7 +1727,10 @@ public class Vala.Parser : CodeVisitor { } if (!root) { if (!accept (TokenType.CLOSE_BRACE)) { - Report.error (get_current_src (), "expected `}'"); + // only report error if it's not a secondary error + if (Report.get_errors () == 0) { + Report.error (get_current_src (), "expected `}'"); + } } } }