kodesoul / nai-lang

Toy programming language.
MIT License
3 stars 0 forks source link

Language Design #1

Open kodesoul opened 2 months ago

kodesoul commented 2 months ago

Scope

I am thinking of this being a weekend project so we should keep it simple.

We could limit it to:

  1. [ ] Primitive data types
  2. [ ] Functions
  3. [ ] while loops
  4. [ ] If statements

What do you think ?

kodesoul commented 2 months ago

Also I think the easiest way to start is to create a compiler that outputs an llvm text file i.e main.ll like the one found in the examples folder. Then compiling to machine code we use zig cc main.ll -o main

kodesoul commented 2 months ago

The language should be a simple procedural language in the style of c, zig and go. We could choose syntax inspired by:

  1. C3
  2. Rust
  3. Go
  4. Odin

Right now I'm leaning towards C3.

waynemaranga commented 2 months ago

We could limit it to:

Basic arithmetic and I/O (unless this is obvious 🙃)

kodesoul commented 2 months ago

Yeah. I over looked it.