A Statically-Typed compiled programming language.
Contact me for help, because I will respond. Discord: amukh1.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Welcome to the Lucidus wiki!
From Github:
$ git clone https://github.com/amukh1/Lucidus ./Lucidus
$ cd Lucidus
$ sudo apt install antlr4
$ chmod +x ./compile.sh
$ sudo ./compile.sh
⚠️ LLVM: Make sure to install LLVM first if you do not have it! (./llvm-install.sh)
From APT: (not set up yet)
$ sudo apt install lucy
Or just search up "Lucidus" in the extensions section
Lets make hello world!
First make a file named test.luci
:
dec printf(fmt:char*, ...) -> int;
This block is declaring the printf function. it takes a static parameter "fmt" for format with type char*
, and returns an int
.
During compilation, the c standard libraries are linked with your code so the definition of printf is provided.
dec main() -> int;
def main() -> int {
}
As you can see a big difference here over other common languages is that you declare before you define functions.
Now for the hello world part: (In the main function)
printf("Hello World!");
return 0;
Now lets run it.
$ lucy test.luci test.ll
This compiles test.luci to an llvm ll file.
Now to run it, we can use lli
:
$ lli test.ll
or clang
:
$ clang test.ll -o test
$ ./test
You can contribute to the project by making a pull request on GitHub.
- Amukh1 - Github / amukh1#9613
See also the list of contributors who participated in this project.
GNU License © Amukh1