提交 76701e14 编写于 作者: M Marek Safar

Keep parsing after invalid contstructor declaration

上级 114aeec4
// CS1525: Unexpected symbol `public', expecting `:', `;', or `{'
// Line: 5
class TorrentEditor {
TorrentEditor ()
public TorrentEditor ()
{
}
}
// CS1018: Keyword `this' or `base' expected // CS1525: Unexpected symbol `{', expecting `base' or `this'
// Line: 5 // Line: 5
class X { class X {
......
// CS1018: Keyword `this' or `base' expected // CS1525: Unexpected symbol `super', expecting `base' or `this'
// Line: 7 // Line: 7
class Bar class Bar
......
...@@ -2245,8 +2245,9 @@ constructor_initializer ...@@ -2245,8 +2245,9 @@ constructor_initializer
$$ = new ConstructorThisInitializer ((Arguments) $5, GetLocation ($2)); $$ = new ConstructorThisInitializer ((Arguments) $5, GetLocation ($2));
lbag.AddLocation ($$, GetLocation ($1), GetLocation ($3), GetLocation ($6)); lbag.AddLocation ($$, GetLocation ($1), GetLocation ($3), GetLocation ($6));
} }
| COLON error { | error
Report.Error (1018, GetLocation ($1), "Keyword `this' or `base' expected"); {
Error_SyntaxError (yyToken);
$$ = null; $$ = null;
} }
; ;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册