DEV Community

kamkow1
kamkow1

Posted on

I've created a programming language...

Hello,
I'd like to share my recent project - a compiler for my own programming language called "Yup". It's implemented using LLVM 14 in Go.

As of now, the language is quite primitive but more features are on the way. I've created some basic examples that show what you can do in yup:
examples

Here's a small example of yup code:

import "$std/io.bc";

fac(n: i32) i32 {
    if n == 0 {
        return 1;
    }

    return n * fac(n - 1);
}

main() i32 {

    var n: i32;
    scan_input("give me a number: %i", &n);
    fmt_print("%i! = %i", n, fac(n));

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

checkout the full repository ;) https://github.com/kamkow1/yup

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more