gram_ast.grampath


gram.js API

Globals / gram-ast / GramPath

Interface: GramPath

GramPath is either empty, or the composition of two paths.

Hierarchy

Indexable

▪ [key: string]: unknown

GramPath is either empty, or the composition of two paths.

Index

Properties

Properties

children

children: [] | [GramPath] | [GramPath, GramPath]

Overrides void

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

The children are the path members which the path composed.

The ‘children’ field is compatible with generic AST.

Either:

  • no children
  • a single child with an implied RHS empty path
  • two children which are composed into a path

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

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

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

The kind of path composition.


labels

Optional labels: string[]

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

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

The data content of the path.


type

type: "path"

Overrides void

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

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