kind

The kind of the syntax node, e.g. if it is a functionDecl.

SyntaxProtocol.swift:174
var kind: SyntaxKind { get }

If you want to check for a node’s kind and cast the node to that type, see self.as(FunctionDeclSyntax.self) or self.as(SyntaxEnum.self).