Home

Awesome

BlazeX

An object orineted AOT compiled language which is gradual typed

Installing

$ git clone https://github.com/BlazifyOrg/blazex.git
$ cd blazex
$ make
$ cd ..
# Set $HOME/.blazex to PATH

Confirm Installation

$ blazex
error: The following required arguments were not provided:
    <path>

USAGE:
    blazex [FLAGS] [OPTIONS] <path>

For more information try --help

Example

extern variadic fun printf(string): int;
printf("Hello World!") @ yep as simple as that
@ single line comment
@@
	multi-line comment
@@
fun sum(a, b) {
    var c = a + b;
    return c;
}

println("%i", sum(2, 2));
var obj = {
    prop: 5 @ properties should be Identifier or there will be Invalid Syntax Error
}

println("%i", obj.prop); @ accessing object property

obj.prop = 10; @ editing object property value
println("%i", obj.prop) @ 10
class Main {
    var a = 10; @ this is a property

    @ this is constructor
    fun() {
        soul.a = 5; @ soul is the current object it's operating on
     }

    @ this is a method
    fun sum_to_a(b) {
        soul.a = soul.a + b;
        return soul.a;
    }
}

var ins = new Main(); @ creating/initializing a class, returns a object with the properties

println("%i", ins.sum_to_a(5));

Dependencies

Contributing

Project Structure

CrateDescription
blazexThe binary
bzxc_lexerLexer for Tokenizing
bzxc_parserParser for AST Tree
bzxc_type_systemType System
bzxc_llvmLLVM IR Code Generation
bzxc_sharedThings Shared among crates

TODO

Author