Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/CLI/include/Luau/Repl.h
2727 views
1
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
2
#pragma once
3
4
#include "lua.h"
5
6
#include <functional>
7
#include <string>
8
9
using AddCompletionCallback = std::function<void(const std::string& completion, const std::string& display)>;
10
11
// Note: These are internal functions which are being exposed in a header
12
// so they can be included by unit tests.
13
void* createCliRequireContext(lua_State* L);
14
void setupState(lua_State* L);
15
std::string runCode(lua_State* L, const std::string& source);
16
void getCompletions(lua_State* L, const std::string& editBuffer, const AddCompletionCallback& addCompletionCallback);
17
18
int replMain(int argc, char** argv);
19
20