Metadata-Version: 2.4
Name: alyx
Version: 1.0.0
Summary: A small, readable interpreted programming language
Author: Alyx contributors
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Alyx 1.0

Alyx is a small, readable interpreted language. Its implementation is pure Python and has no runtime dependencies.

## Install and run

```powershell
pip install .
alyx examples/features.alyx
```

During development, the compatibility command also works:

```powershell
python alyx.py examples/features.alyx
```

## Language at a glance

```alyx
fn square(value)
    ret value * value
end

total = 0
for value in range(1, 6)
    total = total + square(value)
end

if total > 40
    out "large: " + str(total)
end
```

Supported features include numbers, strings, booleans, lists, dictionaries, arithmetic and comparisons; `if`/`elif`/`else`, `while`, `for`, `break`, and `continue`; lexical closures and returns; classes with `this`; and relative imports.

Every block starts on the following line and ends with `end`. Comments start with `#` or `//`.

## Standard library

`len`, `str`, `int`, `float`, `type`, `range`, `push`, `pop`, `keys`, `values`, `split`, `join`, `abs`, `floor`, `clock`, and `assert` are built in.

## Modules

Use a path relative to the importing file and access exported names through an alias:

```alyx
import "maths" as maths
out maths.twice(21)
```

## VS Code

The [vscode-alyx](vscode-alyx) folder is a minimal extension with `.alyx` recognition and syntax highlighting. Open that folder in VS Code and package it with `npx @vscode/vsce package`, then install the generated `.vsix`.

## Development

Run the regression suite with:

```powershell
python -m unittest discover -s tests
```

The public Python API is `alyxlang.run_source()` and `alyxlang.run_file()`.
