Compare commits
2 Commits
main
...
bf56ff223d
| Author | SHA1 | Date | |
|---|---|---|---|
| bf56ff223d | |||
| 49afc6c515 |
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"காட்டு": "print"
|
||||||
|
}
|
||||||
|
|||||||
@@ -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
1
tests/test.tampy
Normal file
@@ -0,0 +1 @@
|
|||||||
|
காட்டு "வணக்கம் உலகமே"
|
||||||
Reference in New Issue
Block a user