![]() | Fun 0.41.5 The programming language that makes You have fun |
Interactive Read–Eval–Print Loop (REPL) for the Fun language. More...
#include "repl.h"#include "bytecode.h"#include "parser.h"#include "value.h"#include "vm.h"#include <ctype.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <dirent.h>#include <limits.h>#include <sys/stat.h>#include <termios.h>#include <unistd.h>
Go to the source code of this file.
Functions | |
| int | map_expanded_line_to_include_path (const char *path, int line, char *out_path, size_t out_path_cap, int *out_line) |
| Map a line number in expanded source back to original include path/line. | |
Interactive Read–Eval–Print Loop (REPL) for the Fun language.
Provides line editing, history, simple completion for :load paths and stdlib identifiers, multi-line input heuristics, and a command interface (e.g. :help, :env, :load). Built only when FUN_WITH_REPL is defined.
Definition in file repl.c.
| extern |
Map a line number in expanded source back to original include path/line.
Scans the expanded text for the nearest preceding __include_begin__ marker and computes the corresponding inner line number.
| path | Path to the original top-level file that was expanded. |
| line | 1-based line number in the expanded text. |
| out_path | Output buffer for the resolved file path. |
| out_path_cap | Capacity of out_path. |
| out_line | Receives 1-based line number within resolved file. |
Definition at line 996 of file parser_utils.c.