Function Graph Overview
    Preparing search index...

    Class Builder

    Constructs the CFG

    Index

    Constructors

    Methods

    • Calls the function within the context of a cluster. Clusters are used for representing context managers and exceptions.

      Clustered can be nested.

      Type Parameters

      • T

      Parameters

      • type: ClusterType

        The type of the cluster.

      • fn: (cluster: Cluster) => T

        The function to run in the context of the cluster.

      Returns T

    • Add a node to the CFG

      Parameters

      • type: NodeType
      • code: string
      • startOffset: number

        The offset in the code for which the node is generated

      Returns string

    • Clones a node.

      Useful for finally blocks, where the "same" node exists in multiple paths.

      Parameters

      • node: string

        The node to clone

      • Optionaloverrides: { cluster: Cluster }

        Node attributes to override

      Returns string

    • Marks a given node.

      This is currently only used for testing, to denote nodes of interest for reachability tests.

      Parameters

      • node: string

        The node to mark

      • marker: string

        The desired marker

      Returns void

    • Adds an edge to the CFG

      Parameters

      • source: string

        Source node

      • target: string

        Target node

      • type: EdgeType = "regular"

        Edge type

      Returns void

    • Sets node attributes if they are not yet set (make them default to a value).

      Parameters

      • node: string

        The node to modify

      • defaults: Partial<GraphNode>

        Attributes to set

      Returns void