MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / _parse_group_argument

Function _parse_group_argument

scripts/lint_note.py:1117–1132  ·  view source on GitHub ↗
(expr: str, start: int)

Source from the content-addressed store, hash-verified

1115
1116
1117def _parse_group_argument(expr: str, start: int) -> int | None:
1118 idx = start
1119 while idx < len(expr) and expr[idx].isspace():
1120 idx += 1
1121 if idx >= len(expr) or expr[idx] != "{":
1122 return None
1123 depth = 0
1124 while idx < len(expr):
1125 if expr[idx] == "{":
1126 depth += 1
1127 elif expr[idx] == "}":
1128 depth -= 1
1129 if depth == 0:
1130 return idx + 1
1131 idx += 1
1132 return None
1133
1134
1135def _has_invalid_frac_arguments(expr: str) -> bool:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected