• Recursively searches for an expression in an ASTNode that satisfies the predicate.

    Parameters

    • node: AstNode

      The node to traverse.

    • predicate: ((expr: AstExpression) => boolean)

      The predicate function to test each expression.

    Returns AstExpression | null

    The first expression that satisfies the predicate, or null if none found.