Skip to content

moah0911/Demon

Demon Logo

Demon Language

Welcome to the official repository for the Demon programming language, a simple, dynamic, and object-oriented scripting language implemented in Rust.

Features

  • Dynamic Typing: Variables are dynamically typed.
  • Familiar Syntax: C-style syntax that is easy to learn for developers coming from languages like C++, Java, or JavaScript.
  • Object-Oriented: Supports classes, methods, and inheritance.
  • First-Class Functions: Functions are first-class citizens and can be passed around like any other value.
  • Garbage Collection: Automatic memory management using a simple garbage collector.
  • Tree-Walk Interpreter: A straightforward and easy-to-understand interpreter implementation.

Getting Started

Prerequisites

Installation

We provide simple installation scripts for both Linux/macOS and Windows.

Linux and macOS

  1. Clone the repository:

    git clone https://github.com/moah0911/Demon.git
    cd Demon/
  2. Run the installation script:

    chmod +x install.sh
    ./install.sh

    This will build the interpreter and install it to $HOME/.local/bin.

  3. Update your PATH: Add the following line to your shell's configuration file (e.g., ~/.zshrc or ~/.bashrc):

    export PATH="$HOME/.local/bin:$PATH"

    Then, restart your terminal or run source ~/.zshrc (or your shell's equivalent).

Windows

  1. Clone the repository:

    git clone https://github.com/moah0911/Demon.git
    cd Demon/demon-lang
  2. Run the installation script:

    .\install.bat

    This will build the interpreter and add it to your user's PATH.

Hello, World!

Create a file named hello.dm with the following content:

print("Hello, World!");

Once installed, you can run it from your terminal:

demon hello.dm

Next Steps

For a deeper dive into the language features, check out the example scripts in the examples/ directory. They cover everything from basic control flow to classes and inheritance.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published