blark.transform.BracketedExpression

class blark.transform.BracketedExpression(expression: Expression, meta: Meta | None = None)[source]

Bases: Expression

An expression with square brackets around it.

This is used exclusively in string length specifications.

Examples:

[a * b]
[255]

See also StringSpecLength.

Lark grammar

This class is used by the following grammar rules:

bracketed_expression

bracketed_expression: "[" expression "]"

Methods

__init__(expression[, meta])

from_lark()

Attributes

meta

expression

expression: Expression
meta: Meta | None = None
__init__(expression: Expression, meta: Meta | None = None) None
from_lark() T