Fun 0.41.5
The programming language that makes you have fun!
Loading...
Searching...
No Matches
repl.h File Reference

Interactive Read-Eval-Print Loop (REPL) entry point. More...

#include "vm.h"
Include dependency graph for repl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int fun_run_repl (VM *vm)
 Run the interactive REPL using an already-initialized VM.

Detailed Description

Interactive Read-Eval-Print Loop (REPL) entry point.

Definition in file repl.h.

Function Documentation

◆ fun_run_repl()

int fun_run_repl ( VM * vm)

Run the interactive REPL using an already-initialized VM.

Reads lines from stdin, evaluates them in the provided VM context, and prints results/errors. The function returns on EOF or when the user issues a quit command supported by the REPL implementation.

Parameters
vmPointer to an initialized VM; must not be NULL.
Returns
0 on normal exit, non-zero on fatal error.

Run the interactive REPL using an already-initialized VM.

Parameters
vmInitialized VM to execute user input within.
Returns
Exit status code for the REPL.

Definition at line 1310 of file repl.c.