Skip to content

A statically-typed procedural programming language with an interpreter built in C++.

Notifications You must be signed in to change notification settings

Multipixels/lotus-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Stargazers Issues LinkedIn


Lotus

A statically-typed procedural programming language with an interpreter built in C++.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Features
  5. Roadmap
  6. Contact

About The Project

Lotus is a programming language I developed to explore the principles of statically-typed procedural languages, test-driven development, and software testing. With Lotus, you can write programs using familiar constructs like collections, dictionaries, and control structures, all parsed and interpreted through an interpreter written in C++.

Built With

Getting Started

Follow these steps to set up and run the Lotus interpreter on your local machine.

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:
    git clone https://github.com/Multipixels/lotus-lang.git
  2. Navigate to the project's src directory:
    cd lotus-lang/src
  3. Open the lotus-lang.sln file in Visual Studio.
  4. Build and run the lotus-interpreter-tests tests.
  5. Build the lotus-interpreter project.

Usage

Write Lotus programs in .lotus files and run them through the interpreter. Here's an example program:

-- Find the sum of the values in a collection
integer sum = 0;
collection<integer> myCollection = [2, 4, 6];

iterate(value : myCollection) {
  sum = sum + myCollection;
}

log(sum);

Run the program:

./lotus-interpreter example.lotus

Features

  • Statically-Typed Variables: Includes primitive types like boolean, integer, float, character, and string.
  • Collections and Dictionaries: Flexible and easy-to-use data structures.
  • Functions: Define reusable blocks of code with return types and parameters.
  • Control Structures: Use if-else, while, for, and more.
  • Built-in Functions: Log messages, calculate lengths, and more.

Roadmap

  • Basic Syntax and Grammar
  • Functions
  • Control Structures
  • Collections
  • Dictionaries
  • Strings
  • Error Reporting Improvements
  • Garbage Collection
  • Standard Library Functions

Contact

Richard Motorgeanu - [email protected]

Project Link: https://github.com/Multipixels/lotus-lang

About

A statically-typed procedural programming language with an interpreter built in C++.

Resources

Stars

Watchers

Forks

Languages