Source code for maha.rexy.templates.expression_result

__all__ = ["ExpressionResult"]

from dataclasses import dataclass
from typing import Any

import maha.rexy as rx


@dataclass
[docs]class ExpressionResult: """A result of a single expression.""" __slots__ = ["start", "end", "value", "expression"]
[docs] start: int
"""Start index of the matched text"""
[docs] end: int
"""End index of the matched text"""
[docs] value: Any
"""Extracted value"""
[docs] expression: "rx.Expression"
"""The expression that was used to find the value"""