mirror of
https://github.com/luau-lang/luau.git
synced 2025-01-05 19:09:11 +00:00
d0222bb554
# What's Changed * Support dead store elimination for `STORE_VECTOR` instruction * Fix parser hang when a separator is used between Luau class declaration properties * Provide properties and metatable for built-in vector type definition to fix type errors * Fix Fragment Autocomplete to ensure correct parentheses insertion behavior. * Add support for 'thread' and 'buffer' primitive types in user-defined type functions --------- Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@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
|