@@ -229,57 +229,6 @@ public override void VisitCompilationUnit(CompilationUnitSyntax node)
229229 }
230230 }
231231 }
232- public override void VisitNamespaceDeclaration ( NamespaceDeclarationSyntax node )
233- {
234- ChildSyntaxList nodesAndTokens = node . ChildNodesAndTokens ( ) ;
235-
236- for ( int i = 0 ; i < nodesAndTokens . Count ; i ++ )
237- {
238- SyntaxNode ? asNode = nodesAndTokens [ i ] . AsNode ( ) ;
239-
240- if ( asNode != null )
241- {
242- SyntaxKind kind = asNode . Kind ( ) ;
243-
244- switch ( kind )
245- {
246- case SyntaxKind . QualifiedName :
247- case SyntaxKind . IdentifierName :
248- break ;
249- case SyntaxKind . ClassDeclaration :
250- VisitClassDeclaration ( ( ClassDeclarationSyntax ) asNode ) ;
251- break ;
252- case SyntaxKind . NamespaceDeclaration :
253- VisitNamespaceDeclaration ( ( NamespaceDeclarationSyntax ) asNode ) ;
254- break ;
255- case SyntaxKind . GlobalStatement :
256- VisitGlobalStatement ( ( GlobalStatementSyntax ) asNode ) ;
257- break ;
258- default :
259- Log . ErrorLine ( $ "asNode : { kind } \n |{ asNode . ToFullString ( ) } |") ;
260- break ;
261- }
262- }
263- else
264- {
265- SyntaxToken asToken = nodesAndTokens [ i ] . AsToken ( ) ;
266- SyntaxKind kind = asToken . Kind ( ) ;
267-
268- switch ( kind )
269- {
270- //Todo? make a scope??? {...}
271- //OpenBraceToken and CloseBraceToken
272- case SyntaxKind . OpenBraceToken :
273- case SyntaxKind . CloseBraceToken :
274- case SyntaxKind . NamespaceKeyword :
275- break ;
276- default :
277- Log . ErrorLine ( $ "asToken : { kind } ") ;
278- break ;
279- }
280- }
281- }
282- }
283232 public override void VisitFileScopedNamespaceDeclaration ( FileScopedNamespaceDeclarationSyntax node )
284233 {
285234 ChildSyntaxList nodesAndTokens = node . ChildNodesAndTokens ( ) ;
@@ -300,8 +249,8 @@ public override void VisitFileScopedNamespaceDeclaration(FileScopedNamespaceDecl
300249 case SyntaxKind . ClassDeclaration :
301250 VisitClassDeclaration ( ( ClassDeclarationSyntax ) asNode ) ;
302251 break ;
303- case SyntaxKind . NamespaceDeclaration :
304- VisitNamespaceDeclaration ( ( NamespaceDeclarationSyntax ) asNode ) ;
252+ case SyntaxKind . FileScopedNamespaceDeclaration :
253+ VisitFileScopedNamespaceDeclaration ( ( FileScopedNamespaceDeclarationSyntax ) asNode ) ;
305254 break ;
306255 case SyntaxKind . GlobalStatement :
307256 VisitGlobalStatement ( ( GlobalStatementSyntax ) asNode ) ;
0 commit comments