DeclarationKind
enumin packageklyn.code.ast
public enum DeclarationKind
DeclarationKind

Classifies structural declarations extracted from source files across languages.

Used by DeclarationNode, DeclarationScanner, KlynParser, JavaParser, and PythonParser for symbol outlines, go-to-definition, and structural code metrics.

import klyn.code.ast

kind = DeclarationKind.CLASS
assert kind.isTypeDeclaration()
assert not kind.isCallable()
Methods
Modifier and Type Member Description
public isCallable
isCallable() as Boolean
Returns true if this declaration represents an executable or reactive callable (CONSTRUCTOR, METHOD, FUNCTION, OPERATOR, PROPERTY, SIGNAL, EVENT).
public isTypeDeclaration
isTypeDeclaration() as Boolean
Returns true if this declaration represents a user-defined type (CLASS, INTERFACE, STRUCT, RECORD, ENUM, TRAIT, ANNOTATION).