Blazex
AOT compiled object oriented programming language
Install / Use
/learn @Blazify/BlazexREADME
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
- Printing the famous "Hello World"
extern variadic fun printf(string): int;
printf("Hello World!") @ yep as simple as that
- Comments
@ single line comment
@@
multi-line comment
@@
- Creating and calling functions
fun sum(a, b) {
var c = a + b;
return c;
}
println("%i", sum(2, 2));
- Working around with objects
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
- Classes
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
- llvm_sys (Interacting with LLVM)
- codespan-reporting (Errors)
- mimalloc (Memory allocation)
- structopt (Argument parsing)
- notify (Look for file changes)
Contributing
- Fork the repository
- Create a branch with the patch/feature you want
- Make Changes to the code
- Commit the code (Use the Emoji Commit Style) and the message should ** NOT** contain the word "release"
- Finally, push the code and make a pull request
Project Structure
| Crate | Description | |:---------------------------------------------:|:--------------------------:| | blazex | The binary | | bzxc_lexer | Lexer for Tokenizing | | bzxc_parser | Parser for AST Tree | | bzxc_type_system | Type System | | bzxc_llvm | LLVM IR Code Generation | | bzxc_shared | Things Shared among crates |
TODO
- [x] Type System
- [x] LLVM
- [x] Errors
- [x] Lexer
- [x] Parser
- [x] Type System
- [x] LLVM
- [x] Reading from file
- [x] Lexer
- [x] Parser
- [x] AST
Author
Related Skills
himalaya
345.4kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
coding-agent
345.4kDelegate coding tasks to Codex, Claude Code, or Pi agents via background process
