Marker vertex for a value in the dataflow of the program. This does not contain the value of the referenced constant as this is available with the id in the NormalizedAst|normalized AST (or more specifically the AstIdMap).

If you have a DataflowGraph|dataflow graph named graph with an AstIdMap and a value vertex object with name value the following Code should work:

const node = graph.idMap.get(value.id)

This then returns the corresponding node in the NormalizedAst|normalized AST, for example, an RNumber or RString.

This works similarly for IdentifierReference|identifier references for which you can use the IdentifierReference#nodeId|nodeId.

isValueVertex - to check if a vertex is a value vertex

interface DataflowGraphVertexValue {
    controlDependencies: undefined | ControlDependency[];
    environment?: undefined;
    id: NodeId;
    indicesCollection?: ContainerIndicesCollection;
    tag: Value;
}

Hierarchy (view full)

Hierarchy-Diagram

UML class diagram of DataflowGraphVertexValue

Properties

controlDependencies: undefined | ControlDependency[]

ControlDependency - the collection of control dependencies which have an influence on whether the vertex is executed.

environment?: undefined

The environment in which the vertex is set.

id: NodeId

The id of the node (the id assigned by the ParentInformation decoration). This unanimously identifies the vertex in the DataflowGraph|dataflow graph as well as the corresponding NormalizedAst|normalized AST.

indicesCollection?: ContainerIndicesCollection

this attribute links a vertex to indices (pointer links) it may be affected by or related to

tag: Value

Used to identify and separate different types of vertices.