From 49afc6c515991911efd2cf7971b2b0c972d115ca Mon Sep 17 00:00:00 2001 From: KeshavAnandCode Date: Fri, 1 May 2026 23:19:41 -0500 Subject: [PATCH] wrote trannspiler --- src/tampy/transpiler.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tampy/transpiler.py b/src/tampy/transpiler.py index e69de29..2e17fcd 100644 --- a/src/tampy/transpiler.py +++ b/src/tampy/transpiler.py @@ -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