MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / extract_defines

Function extract_defines

lean_py/_parse.py:107–117  ·  view source on GitHub ↗

Extract integer #define constants from raw header.

(header_path: Path)

Source from the content-addressed store, hash-verified

105 return header
106
107 raise FileNotFoundError(
108 "lean.h not found: ensure `lean` is on PATH (try `elan default <toolchain>`)"
109 )
110
111
112# ============================================================================
113# Extraction
114# ============================================================================
115
116
117def extract_defines(header_path: Path) -> dict[str, int]:
118 """Extract integer #define constants from raw header."""
119 text = header_path.read_text()
120 defines = {}

Callers 1

get_header_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected