Compare commits

...

2 Commits

Author SHA1 Message Date
bf56ff223d Add transpiler logic and test file 2026-05-01 23:26:25 -05:00
49afc6c515 wrote trannspiler 2026-05-01 23:19:41 -05:00
4 changed files with 19 additions and 6 deletions

View File

@@ -0,0 +1,3 @@
{
"காட்டு": "print"
}

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

1
tests/test.tampy Normal file
View File

@@ -0,0 +1 @@
காட்டு "வணக்கம் உலகமே"

7
uv.lock generated
View File

@@ -1,8 +1,3 @@
version = 1
revision = 3
requires-python = ">=3.8"
[[package]]
name = "tampy"
version = "0.1.0"
source = { editable = "." }
requires-python = ">=3.14"