Skip to content

AttributeDef

Generated from the TypeQLite grammar.

An AttributeDef node of the TypeQLite syntax tree: what the grammar rule AttributeDef produces. Its $type is 'AttributeDef'.

Written like:

attribute person-id, value string;
attribute age @independent, value integer;
attribute email value string @regex("^.*@.*$");
attribute empty-sub-data @abstract, sub empty-data;
attribute person-name sub name;

Properties

Name Description
$container The container node in the AST; every node except the root node has a container.
$containerIndex? In case $containerProperty is an array, the array index is stored here.
$containerProperty? The property of the $container node that contains this node.
$cstNode? The Concrete Syntax Tree (CST) node of the text range from which this node was parsed.
$document? The document containing the AST; only the root node has a direct reference to the document.
$type Every AST node has a type corresponding to what was specified in the grammar declaration.
annotations The Annotation nodes written in annotations, in source order.
name The text written for name.
subAnnotations The annotations written after the sub clause.
superType? A reference to a AttributeDef the source names in superType: .ref is the definition it resolves to (undefined if it does not), .$refText the name as written.
valueAnnotations The annotations written after the value clause.
valueType? The ValueType value written in valueType.

readonly $container: DefineClause

The container node in the AST; every node except the root node has a container.

langium.AstNode.$container


readonly optional $containerIndex?: number

Defined in: node_modules/langium/lib/syntax-tree.d.ts:21

In case $containerProperty is an array, the array index is stored here.

langium.AstNode.$containerIndex


readonly optional $containerProperty?: string

Defined in: node_modules/langium/lib/syntax-tree.d.ts:19

The property of the $container node that contains this node. This is either a direct reference or an array.

langium.AstNode.$containerProperty


readonly optional $cstNode?: CstNode

Defined in: node_modules/langium/lib/syntax-tree.d.ts:23

The Concrete Syntax Tree (CST) node of the text range from which this node was parsed.

langium.AstNode.$cstNode


readonly optional $document?: LangiumDocument<AstNode>

Defined in: node_modules/langium/lib/syntax-tree.d.ts:25

The document containing the AST; only the root node has a direct reference to the document.

langium.AstNode.$document


readonly $type: "AttributeDef"

Every AST node has a type corresponding to what was specified in the grammar declaration.

langium.AstNode.$type


annotations: Annotation[]

The Annotation nodes written in annotations, in source order.


name: string

The text written for name.


subAnnotations: Annotation[]

The annotations written after the sub clause.


optional superType?: Reference<AttributeDef>

A reference to a AttributeDef the source names in superType: .ref is the definition it resolves to (undefined if it does not), .$refText the name as written. It is absent when the source does not write it.


valueAnnotations: Annotation[]

The annotations written after the value clause.


optional valueType?: string

The ValueType value written in valueType. It is absent when the source does not write it.

TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.