added index and getting started

This commit is contained in:
2026-05-20 22:11:25 -05:00
parent bd5ec35ce2
commit 4227d48f30
2 changed files with 175 additions and 0 deletions

View File

@@ -1 +1,42 @@
# ForeignThon
Write Python in any human language.
ForeignThon is a transpiler that converts `.xx.py` files into standard Python — keywords, builtins, and exceptions all translated into your language. The compiled output runs anywhere without ForeignThon installed.
---
## How it works
```
source.es.py → fpy → source.compiled.py → Python
```
ForeignThon uses Python's `tokenize` module to swap `NAME` tokens. Strings, comments, and f-strings are never touched. The result is identical, valid Python.
---
## Install
```bash
pip install foreignthon
pip install foreignthon-es # or any other language pack
```
---
## At a glance
| Feature | Description |
|---|---|
| Transpiler | Tokenizer-based, safe, unicode-aware |
| File format | `.xx.py` where `xx` is the language code |
| Errors | Shown in your language first, English below |
| Postfix syntax | `@@` operator for SOV languages |
| Custom packs | Local JSON override, no PyPI needed |
| CLI | `fpy run`, `fpy compile`, `fpy decompile`, `fpy new` |
---
[Get started →](getting-started.md){ .md-button .md-button--primary }
[CLI Reference →](cli-reference.md){ .md-button }