File tree Expand file tree Collapse file tree
ICSharpCode.Decompiler/CSharp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,13 +163,28 @@ public override void VisitBlockStatement(BlockStatement blockStatement)
163163 }
164164 }
165165
166+ public override void VisitFieldDeclaration ( FieldDeclaration fieldDeclaration )
167+ {
168+ foreach ( var variable in fieldDeclaration . Variables )
169+ {
170+ if ( ! variable . AssignToken . IsNull || ! variable . Initializer . IsNull ) {
171+ VisitAsSequencePoint ( variable ) ;
172+ }
173+ }
174+ base . VisitFieldDeclaration ( fieldDeclaration ) ;
175+ }
176+
166177 public override void VisitPropertyDeclaration ( PropertyDeclaration propertyDeclaration )
167178 {
168179 if ( ! propertyDeclaration . ExpressionBody . IsNull )
169180 {
170181 VisitAsSequencePoint ( propertyDeclaration . ExpressionBody ) ;
171- }
172- else
182+ }
183+ else if ( ! propertyDeclaration . Initializer . IsNull )
184+ {
185+ VisitAsSequencePoint ( propertyDeclaration . Initializer ) ;
186+ }
187+ else
173188 {
174189 base . VisitPropertyDeclaration ( propertyDeclaration ) ;
175190 }
@@ -202,6 +217,17 @@ public override void VisitForStatement(ForStatement forStatement)
202217 VisitAsSequencePoint ( forStatement . EmbeddedStatement ) ;
203218 }
204219
220+ public override void VisitEventDeclaration ( EventDeclaration eventDeclaration )
221+ {
222+ foreach ( var variable in eventDeclaration . Variables )
223+ {
224+ if ( ! variable . AssignToken . IsNull || ! variable . Initializer . IsNull ) {
225+ VisitAsSequencePoint ( variable ) ;
226+ }
227+ }
228+ base . VisitEventDeclaration ( eventDeclaration ) ;
229+ }
230+
205231 public override void VisitSwitchStatement ( SwitchStatement switchStatement )
206232 {
207233 StartSequencePoint ( switchStatement ) ;
You can’t perform that action at this time.
0 commit comments