protected override void NewChild(SyntaxNode node) { switch (node.SyntaxType) { case SyntaxType.StructKeyword: this.StructKeyword = node as SyntaxToken; break; case SyntaxType.TypeName: this.TypeName = node as TypeNameSyntax; break; case SyntaxType.LeftBraceToken: this.LeftBrace = node as SyntaxToken; break; case SyntaxType.StructDeclaration: this.structDeclarations.Add(node as StructDeclarationSyntax); break; case SyntaxType.RightBraceToken: this.RightBrace = node as SyntaxToken; break; } }
protected override void NewChild(SyntaxNode node) { switch (node.SyntaxType) { case SyntaxType.TypeName: this.TypeName = node as TypeNameSyntax; break; case SyntaxType.StructSpecifier: this.StructSpecifier = node as StructSpecifierSyntax; break; default: if (node.SyntaxType.IsType()) { this.Keyword = node as SyntaxToken; } break; } }