Commit d23a9ee1 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

don't report secondary syntax errors, fixes bug 511896

2008-04-18  Juerg Billeter  <j@bitron.ch>

	* vala/valaparser.vala: don't report secondary syntax errors,
	  fixes bug 511896

svn path=/trunk/; revision=1256
parent 3e4156ad
2008-04-18 Jürg Billeter <j@bitron.ch>
* vala/valaparser.vala: don't report secondary syntax errors,
fixes bug 511896
2008-04-18 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala, gobject/valaccodegeneratorclass.vala: make
......
......@@ -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 `}'");
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment