peach πŸ‘

Lightweight dependency-free scripting language with C++17, that can be extended by user. All scripts can be evaluated in your program runtime.

Documentation

Wiki is avaiable on github: syntax page

Current features

Building

git --version
cmake --version
clang-10 --version
mkdir build && cd build
cmake ..
make

How to use

Using with command line interface

gleb@ZenBook:~/Documents/projects/peach$ ./build/peach
Peach
>>> let even_numbers = 0
0
>>> let n = 11
11
>>> while n -= 1
...     even_numbers += n % 2 == 0
...
5
>>>

Write script

let a = 123
let cnt_even = 0
let cnt_odd = 0
let some_other_variable
while (a != 0) & cnt_even < 10
    if a % 2 == 0
        cnt_even += 1
        if cnt_even % 3 == 2:
            some_other_variable += 2 ** cnt_even
    else
        cnt_odd += 1
    a -= 1
some_other_variable

Then you program evaluation will look like:

gleb@ZenBook:~/Documents/projects/peach$ ./build/peach hello.pch
292