Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
fun.c File Reference

Command-line interface and entry point for the Fun interpreter. More...

#include "bytecode.h"
#include "parser.h"
#include "vm.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for fun.c:

Go to the source code of this file.

Macros

#define FUN_VERSION   "0.0.0-dev"

Functions

int main (int argc, char **argv)
 Program entry point for the Fun interpreter.

Detailed Description

Command-line interface and entry point for the Fun interpreter.

Main entry point for the Fun language interpreter. Builds a CLI that runs a script file if provided; otherwise starts the REPL when compiled with FUN_WITH_REPL enabled.

Definition in file fun.c.

Macro Definition Documentation

◆ FUN_VERSION

#define FUN_VERSION   "0.0.0-dev"

Definition at line 32 of file fun.c.

Function Documentation

◆ main()

int main(intargc,
char **argv )

Program entry point for the Fun interpreter.

Parses CLI options, compiles and runs a script file if provided, or launches the REPL when enabled and no script is given. Exposes script arguments to the program via FUN_ARGC/FUN_ARGV_i/FUN_ARGS environment variables.

Parameters
argcArgument count.
argvArgument vector; argv[0] is used to expose FUN_EXECUTABLE.
Returns
Process exit code, typically taken from the VM after execution.

Definition at line 76 of file fun.c.

Here is the call graph for this function: