blark.transform.IndirectionType

class blark.transform.IndirectionType(pointer_depth: int, reference: bool, meta: Meta | None = None)[source]

Bases: object

Indirect access through a pointer or reference.

Lark grammar

This class is used by the following grammar rules:

indirection_type

indirection_type: REFERENCE_TO
                | POINTER_TO+
                | REFERENCE_TO POINTER_TO+

pointer_type

pointer_type: POINTER_TO+

Methods

__init__(pointer_depth, reference[, meta])

from_lark(*tokens)

Attributes

is_indirect

True if this denotes a pointer (of any depth) or a reference.

meta

value

pointer_depth

A depth of 1 is "POINTER TO", a depth of 2 is "POINTER TO POINTER TO".

reference

If set, "REFERENCE TO POINTER TO..."

pointer_depth: int

A depth of 1 is “POINTER TO”, a depth of 2 is “POINTER TO POINTER TO”.

reference: bool

If set, “REFERENCE TO POINTER TO…”

meta: Meta | None = None
property is_indirect: bool

True if this denotes a pointer (of any depth) or a reference.

static from_lark(*tokens: Token) IndirectionType[source]
property value: str
__init__(pointer_depth: int, reference: bool, meta: Meta | None = None) None