blark.transform.StringSpecLength
- class blark.transform.StringSpecLength(length: ParenthesizedExpression | BracketedExpression)[source]
Bases:
object
The length of a defined string.
The grammar makes a distinction between brackets and parentheses, though they appear to be functionally equivalent.
Examples:
[1] (1) [255]
Lark grammar
This class is used by the following grammar rules:
string_spec_length
string_spec_length: parenthesized_expression | bracketed_expression
Methods
__init__
(length)Attributes
- length: ParenthesizedExpression | BracketedExpression
- __init__(length: ParenthesizedExpression | BracketedExpression) None
- from_lark() T