Skip to content

OMouta/molt-lang

Repository files navigation

@molt

@molt is a small expression-oriented language for quoting code, rewriting it with first-class mutations, and executing the result explicitly.

Core primitives:

@{ ... }   # quote code
~{ ... }   # define a mutation

@molt is pre-alpha software. The language, implementation, and documentation are all in early stages of development. Expect breaking changes and incomplete features. Feedback and contributions are very welcome!

Quick Start

Requirements:

  • Go 1.26

Build and test:

go build ./...
go test ./...
go vet ./...

Format Molt and Go sources:

go run ./cmd/molt fmt .

Check formatting without rewriting files:

go run ./cmd/molt fmt --check .

Run a program:

go run ./cmd/molt ./examples/basic/basic_mutation.molt

Convenience wrappers are also available:

./dev.ps1 build
./dev.ps1 test
./dev.ps1 lint
./dev.ps1 format
./dev.ps1 format:check

Example

import "std:io"

fn add(a, b) = a + b
fn mul = add ~{ + -> * }

print(add(2, 3))
print(mul(2, 3))

Contributing

Contributions are welcome! Please see the contributing guide for details on how to get involved.

License

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

About

A small expression-oriented language for quoting code and rewriting it with first-class mutations

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages