Skip to content

Ernest1338/black

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚫️ Black ☠︎︎ ⚫️

Black is a custom programming language implemented in Rust. The project aims to provide a simple yet powerful language with an interactive interpreter mode and a performant compiler based on the QBE backend.

Features 🌟

  • Interpreter: Run Black code without any compilation steps.
  • Interactive Mode: Run Black code interactively in a REPL (Read-Eval-Print Loop) environment.
  • Compiler: Compile Black source code files to a native binary.

Example 📘

Here's a simple example of using Black in interactive mode:

>>> let x = 10let y = 20let sum = x + y
  … print("The sum of", x, "and", y, "is", sum)
30

Installation 🛠️

To install Black, follow these steps:

Clone the repository:

git clone https://github.com/Ernest1338/black.git

Navigate to the project directory:

cd black

Build the project using Cargo:

cargo build --release

Usage 🚀

Interactive Mode

To start the interactive mode, run the following command:

./black

You will see a prompt where you can enter Black code line by line. Type exit or quit to leave the interactive mode.

Interpreter

To interpret a black file, use the following command

./black -i <path_to_source_file>

Replace <path_to_source_file> with the path to your Black source file.

Compiling Source Files

To compile a Black source file, use:

./black <path_to_source_file>

Replace <path_to_source_file> with the path to your Black source file.

License 📄

This project is licensed under the MIT License. See the LICENSE file for details.

About

⚫️ Black lang ☠︎︎ ⚫️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages