gram_ast.gramedge


gram.js API

Globals / gram-ast / GramEdge

Interface: GramEdge

A GramEdge is a special case of a path composed of two GramNodes.

Hierarchy

Indexable

▪ [key: string]: unknown

A GramEdge is a special case of a path composed of two GramNodes.

Index

Properties

Properties

children

children: [GramNode, GramNode]

Overrides GramPath.children

Defined in packages/gram-ast/src/index.ts:160

The adjacent Nodes of the Edge, known as “children” in the AST.

children[0] is the ‘left’ Node children[1] is the ‘right’ Node


data

Optional data: Data

Inherited from GramSeq.data

Defined in packages/gram-ast/node_modules/@types/unist/index.d.ts:23

Information from the ecosystem.


id

Optional id: undefined | string

Inherited from GramPath.id

Defined in packages/gram-ast/src/index.ts:57

An identifier for the path.

For example, ‘1’ in ()-[1]->() or ‘a’ in (a)


kind

Optional kind: PathKind

Inherited from GramPath.kind

Defined in packages/gram-ast/src/index.ts:62

The kind of path composition.


labels

Optional labels: string[]

Inherited from GramPath.labels

Defined in packages/gram-ast/src/index.ts:69

Labels are used to qualify a path.

For example, ‘Aye’ in (:Aye) or ‘KNOWS’ in (a)-[:KNOWS]->(b)


position

Optional position: Position

Inherited from GramSeq.position

Defined in packages/gram-ast/node_modules/@types/unist/index.d.ts:29

Location of a node in a source document. Must not be present if a node is generated.


record

Optional record: GramRecord

Inherited from GramPath.record

Defined in packages/gram-ast/src/index.ts:74

The data content of the path.


type

type: "path"

Inherited from GramPath.type

Overrides void

Defined in packages/gram-ast/src/index.ts:50

Type discriminator for this AST element, always ‘path’.