INNER CODE UNIT · Python
Guidance
bsilverthorn/maccarone · src/maccarone/preprocessor.py:97
class Guidance:
text: str
@dataclass
class SnippetOpen:
indent: str
guidance: str
def find_line_number(text: str, pos: int):
#<<find the line number of the given char position>>
return text.count('\n', 0, pos) + 1
#<</>>
class RawSourceVisitor(NodeVisitor):
def __init__(self, raw_source: str, block_at_line: Optional[int] = None):
self._raw_source = raw_source
self._block_at_line = block_at_line