mirror of
https://github.com/luau-lang/luau.git
synced 2025-01-10 13:29:09 +00:00
230ab81326
* Luau: support dead store elimination for STORE_VECTOR instruction * Fixed hang when Luau class declaration props are incorrectly separated * Provide properties and a metatable for Luau built-in vector type * Pick the correct global scope based on the solver * Conversational AI gets all required scripts as context * Clip LuauRequireCyclesDontAlwaysReturnAny * Fix Parentheses in Fragment Autocomplete * Remove write-only locals in `Luau::getDocumentOffsets` * The lexer can resume parsing from any arbitrary position * Added support for 'thread' and 'buffer' primitive types in Luau user-defined type functions --------- Co-authored-by: Andrew Miranti <amiranti@roblox.com> Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Shiqi Ai <sai@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Yohoo Lin <yohoo@roblox.com>
34 lines
822 B
C++
34 lines
822 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 "Luau/Ast.h"
|
|
#include "Luau/DenseHash.h"
|
|
|
|
#include <vector>
|
|
|
|
namespace Luau
|
|
{
|
|
|
|
enum class Mode
|
|
{
|
|
NoCheck, // Do not perform any inference
|
|
Nonstrict, // Unannotated symbols are any
|
|
Strict, // Unannotated symbols are inferred
|
|
Definition, // Type definition module, has special parsing rules
|
|
};
|
|
|
|
struct FragmentParseResumeSettings
|
|
{
|
|
DenseHashMap<AstName, AstLocal*> localMap{AstName()};
|
|
std::vector<AstLocal*> localStack;
|
|
Position resumePosition;
|
|
};
|
|
|
|
struct ParseOptions
|
|
{
|
|
bool allowDeclarationSyntax = false;
|
|
bool captureComments = false;
|
|
std::optional<FragmentParseResumeSettings> parseFragment = std::nullopt;
|
|
};
|
|
|
|
} // namespace Luau
|