Skip to content

A programming language for leaning purposes with a compiler written in C# and LLVM API.

Notifications You must be signed in to change notification settings

IDjinn/Djinn-Lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Djinn Language

Simple and basic compiler of Djinn language to generate native code binaries with LLVM support.

Example code

function int32 add(int32 a, int32 b) {
    ret a + b;
}

function int32 main() {
    int32 counter = 0;
    while (counter < 10 ) {
        printf(add(counter, 1));
        counter++;
    }

    if ( counter < 10 ) {
        printf("counter = %d", counter);
        ret counter;
    }    

    ret 0;
}

Language Features

  • Functions
  • Imports
  • If
  • Else
  • Switch/case
  • Basic Types
    • Integers
    • Floating-point numbers
    • Strings
    • Booleans
    • Characters
  • Custom types
    • Structs
    • Enums
    • Classes
    • Interfaces
    • Abstract classes
    • Generics
  • Arrays
  • Loops
    • For
      • While
      • Do-while

Future

  • Standard Library
  • Lists/Sets
  • Maps/Dictionaries
  • Compile time expressions
  • Memory Management

About

A programming language for leaning purposes with a compiler written in C# and LLVM API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages