Skip to content

rb-de0/carrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

carrot

carrot is a small programming language has LLVM Backend.

Requirements

  • LLVM 12.x
  • clang 12.x

Install

% git clone https://github.com/rb-de0/carrot
% cd carrot
% go install
% go build 
% ./carrot

Spec

Entry

You need not implement a entry function (like main). However you need implement return exit code.

...
return 0;

Variable

Only Interger Type is implemented.

var value = 10;
value = 1;

Control

if (x < 10) {
    ...
} else {
    ...
}

Loop

for {
    i = i + 1;
    if (i > 10) {
        break;
    }
}

Function

fnc sum(x, y) {
    return x + y;
} 
var s = sum(1, 4);

References

About

carrot is a small programming language has LLVM Backend.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages