Allow user to pass code generation input to Makefile

This commit is contained in:
2025-11-08 00:06:48 +00:00
parent 0354c7b485
commit 725955cb2e
2 changed files with 4 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ def main(types_file: Path | None):
dbl_list_datatypes: Dict[CDataType, DblListData] = {}
array_datatypes: Dict[CDataType, ArrayData] = {}
if types_file is not None:
if types_file is not None and types_file.is_file() and "json" in types_file.suffix.lower():
with types_file.open("r") as infile:
datatypes = json.load(infile)
dbl_list_data = datatypes.get(DBL_LIST_DATA)