(self, line: str)
| 55 | return match.string[:match.start()] + expanded_value + match.string[match.end():] |
| 56 | |
| 57 | def _parse_include_directive(self, line: str) -> str: |
| 58 | match = re.fullmatch(r"\\{(.+)\}", line) |
| 59 | if not match: |
| 60 | raise ValueError("Invalid include directive") |
| 61 | return match.groups()[0] |
| 62 | |
| 63 | def _parse_section_header(self, line: str) -> Section: |
| 64 | match = re.fullmatch(r"\[(\w+):(\w+)\]", line) |