This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
from typing import Callable | |
@dataclass | |
class Position: | |
""" | |
Represents a portion of a string. | |
Note that while it is not strictly required to have position information, | |
it is always something useful to have and trivial to implement in an AST. |