Skip to content

lotuslang/lotus

Folders and files

NameName
Last commit message
Last commit date
Mar 10, 2025
Mar 10, 2025
Feb 20, 2020
Dec 29, 2024
Sep 18, 2022
Sep 18, 2022
Oct 10, 2022
Dec 29, 2024
Dec 29, 2024

Repository files navigation

lotus

A toy language for personally exploring compilers and language design.

You can find some (somewhat outdated) notes and drafts about lotus in the wiki, although a large amount of ideas are just floating around in my personal notes. In either case, lotus is an ever-changing thing, so most samples and document are subject to documentation-rot. For example, some features (such as enums or generic types) are currently severely limited or even not supported at all. Once I'm satisfied with the parser and front-end for lotus (e.g. good CLI, or the ability to process a project instead of a single file), I'll most likely write a sample project to test things on; but until then test.lts is the most up-to-date example of lotus code.

Usage

Although lotus is nowhere-near usable, it is distributed with a very basic CLI, currently built with System.CommandLine. It supports checking an input file for parsing errors, as well as output the parse tree in Graphviz/DOT format (optionally with const-coloring). It can also try to reconstruct the original source file solely from the parse tree. For more info, run dotnet run --project ./src/Lotus.CLI/ -- -h.

About

A toy language/compiler written from scratch in C#

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages