wrote trannspiler

This commit is contained in:
2026-05-01 23:19:41 -05:00
parent 23af363dfb
commit 49afc6c515

View File

@@ -0,0 +1,14 @@
import json
from pathlib import Path
KEYWORDS_PATH = Path(__file__).parent / "keywords.json"
with open(KEYWORDS_PATH, "r", encoding="utf-8") as f:
KEYWORDS = json.load(f)
def transpile(code: str) -> str:
"""Replace Tamil keywords with Python equivalents."""
output = code
for tamil, python in KEYWORDS.items():
output = output.replace(tamil, python)
return output