semvec/pypi-packages huggingface dataset:
yoctium 1.0.1
A simple python program to be the compiler for my own small language, YoctoScript
License: Apache-2.0
Requires Python: >=3.6

# YoctoScript

A minimal scripting language and interpreter for learning, experimentation, and fun.

## Overview

YoctoScript is a lightweight scripting language, designed to be simple and approachable. The core of the project is the `Yoctium` interpreter, which executes YoctoScript code and allows you to experiment with language design and scripting.

## Features

- **Variable Declarations** — Use `var x = 5` to create variables.
- **Function Calls** — Built-in calls like `Console.display("Hello")`.
- **Built-in Types and Functions** — Includes `String`, `read` (for input), and more.
- **Command-Line Execution** — Run `.ys` scripts directly from the terminal.
- **Error Reporting** — Helpful errors with line numbers.
- **Easy to Extend** — Simple Python codebase for adding your own features.

## Installation

Install the package via pip:

```bash
pip install Yoctium
```

## Usage

### Import and Run Code in Python

```python
from Yoctium import Yoctium

code = '''
var x = 5
Console.display(x)
'''

interpreter = Yoctium()
interpreter.run_code(code)
```

### Run YoctoScript Files from the Command Line

After installation, you can run YoctoScript files (with `.ys` extension) directly:

```bash
yoctorun my_script.ys
```

This will execute the code stored in `my_script.ys`.

## Example YoctoScript

```ys
var name = read("What is your name? ")
Console.display("Hello, " + name)
```

Save as `hello.ys` and run:

```bash
yoctorun hello.ys
```

## License

Apache License 2.0