Luma 0.1.0
A low-level compiled alternative to C, C++, and more!
Loading...
Searching...
No Matches
Functions
main.c File Reference

Entry point for the Luma compiler/interpreter build process. More...

#include "c_libs/memory/memory.h"
#include "helper/help.h"
#include "lsp/lsp.h"
Include dependency graph for main.c:

Functions

int main (int argc, char *argv[])
 Program entry point.
 

Detailed Description

Entry point for the Luma compiler/interpreter build process.

This program parses command-line arguments, sets up a memory arena, and runs the build process on a provided source file.

Responsibilities

Usage

luma build <source_file>

Example:

luma build hello.lx

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Program entry point.

This function:

  1. Validates the number of arguments.
  2. Parses build configuration from CLI arguments.
  3. Initializes an arena allocator for memory management.
  4. Executes the build process.
  5. Cleans up resources and returns the appropriate exit code.
Parameters
argcArgument count from the command line.
argvArgument vector from the command line.
Returns
0 if the build succeeded, non-zero on failure.