handle

abstract fun handle(expr: T): S?

The returned CPG node type S should be as specific as possible to make it easier for the caller. For example, if a handler parses functions and methods, it should at least return a FunctionDeclaration and not just a Declaration.

Furthermore, this function can return null, even though it should be avoided. A valid use-case is that some nodes might be not relevant to be directly into CPG nodes at this stage, for example comments.