mirror of
https://github.com/luau-lang/luau.git
synced 2025-08-26 19:37:04 +01:00
# General Changes * Remove a `static_assert` that prevented Luau from building on 32-bit targets. * Fix `proxyrequire` (see https://github.com/luau-lang/luau/pull/1804) * Replace contents API with new `loadname` API in Luau.Require * Store the positions of `:` symbols in the CST. * Fix a minor bug in the new incremental autocomplete engine: Properly suggest `else` and `elseif` if the cursor is currently within an `if` block. # New Type Solver * Allow generics to be substituted for negation types when performing subtype tests * Crash fixes * Surface subtyping errors more consistently. * Avoid creating double-negation types (like `~~(false?)`) when generating constraints. # Internal Contributors Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Talha Pathan <tpathan@roblox.com> Co-authored-by: Varun Saini <vsaini@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> --------- Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com> Co-authored-by: Alexander Youngblood <ayoungblood@roblox.com> Co-authored-by: Menarul Alam <malam@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: Vighnesh <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com>
18 lines
711 B
C++
18 lines
711 B
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#pragma once
|
|
|
|
#include "lua.h"
|
|
|
|
#include <functional>
|
|
#include <string>
|
|
|
|
using AddCompletionCallback = std::function<void(const std::string& completion, const std::string& display)>;
|
|
|
|
// Note: These are internal functions which are being exposed in a header
|
|
// so they can be included by unit tests.
|
|
void* createCliRequireContext(lua_State* L);
|
|
void setupState(lua_State* L);
|
|
std::string runCode(lua_State* L, const std::string& source);
|
|
void getCompletions(lua_State* L, const std::string& editBuffer, const AddCompletionCallback& addCompletionCallback);
|
|
|
|
int replMain(int argc, char** argv);
|