Skip to content

Commit 1311ebf

Browse files
committed
v0.20.5+luau725
1 parent 8b833b9 commit 1311ebf

34 files changed

Lines changed: 674 additions & 378 deletions

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "luau0-src"
3-
version = "0.20.4+luau724"
3+
version = "0.20.5+luau725"
44
authors = ["Aleksandr Orlenko <zxteam@protonmail.com>"]
55
edition = "2024"
66
repository = "https://github.com/mlua-rs/luau-src-rs"

luau/Ast/include/Luau/Ast.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class AstAttr : public AstNode
213213
public:
214214
LUAU_RTTI(AstAttr)
215215

216-
enum Type
216+
enum class Type
217217
{
218218
Checked,
219219
Native,
@@ -377,7 +377,7 @@ class AstExprConstantString : public AstExpr
377377
public:
378378
LUAU_RTTI(AstExprConstantString)
379379

380-
enum QuoteStyle
380+
enum class QuoteStyle
381381
{
382382
// A string created using double quotes or an interpolated string,
383383
// as in:
@@ -563,7 +563,7 @@ class AstExprTable : public AstExpr
563563

564564
struct Item
565565
{
566-
enum Kind
566+
enum class Kind
567567
{
568568
List, // foo, in which case key is a nullptr
569569
Record, // foo=bar, in which case key is a AstExprConstantString
@@ -590,7 +590,7 @@ class AstExprUnary : public AstExpr
590590
public:
591591
LUAU_RTTI(AstExprUnary)
592592

593-
enum Op
593+
enum class Op
594594
{
595595
Not,
596596
Minus,
@@ -850,6 +850,8 @@ class AstStatLocal : public AstStat
850850
bool isConst = false;
851851
bool isExported = false;
852852

853+
// if the StatLocal is being exported, this is the location of `const` or `local`
854+
std::optional<Location> keywordLocation;
853855
std::optional<Location> equalsSignLocation;
854856
};
855857

luau/Ast/include/Luau/Cst.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class CstExprConstantString : public CstNode
8686
public:
8787
LUAU_CST_RTTI(CstExprConstantString)
8888

89-
enum QuoteStyle
89+
enum class QuoteStyle
9090
{
9191
QuotedSingle,
9292
QuotedDouble,
@@ -159,7 +159,7 @@ class CstExprTable : public CstNode
159159
public:
160160
LUAU_CST_RTTI(CstExprTable)
161161

162-
enum Separator
162+
enum class Separator
163163
{
164164
Comma,
165165
Semicolon,
@@ -272,8 +272,6 @@ class CstStatLocal : public CstNode
272272

273273
CstStatLocal(AstArray<Position> varsAnnotationColonPositions, AstArray<Position> varsCommaPositions, AstArray<Position> valuesCommaPositions);
274274

275-
// if the StatLocal is being exported, this is the position of `const` or `local`
276-
Position declarationKeywordPosition;
277275
AstArray<Position> varsAnnotationColonPositions;
278276
AstArray<Position> varsCommaPositions;
279277
AstArray<Position> valuesCommaPositions;
@@ -424,7 +422,7 @@ class CstTypeTable : public CstNode
424422

425423
struct Item
426424
{
427-
enum struct Kind
425+
enum class Kind
428426
{
429427
Indexer,
430428
Property,

luau/Ast/src/Ast.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,11 @@ std::string toString(AstExprUnary::Op op)
423423
{
424424
switch (op)
425425
{
426-
case AstExprUnary::Minus:
426+
case AstExprUnary::Op::Minus:
427427
return "-";
428-
case AstExprUnary::Not:
428+
case AstExprUnary::Op::Not:
429429
return "not";
430-
case AstExprUnary::Len:
430+
case AstExprUnary::Op::Len:
431431
return "#";
432432
default:
433433
LUAU_ASSERT(false);

luau/Ast/src/Cst.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ CstStatLocal::CstStatLocal(
123123
AstArray<Position> valuesCommaPositions
124124
)
125125
: CstNode(CstClassIndex())
126-
, declarationKeywordPosition(Position::missing())
127126
, varsAnnotationColonPositions(varsAnnotationColonPositions)
128127
, varsCommaPositions(varsCommaPositions)
129128
, valuesCommaPositions(valuesCommaPositions)
@@ -284,7 +283,7 @@ CstTypeSingletonString::CstTypeSingletonString(AstArray<char> sourceString, CstE
284283
, quoteStyle(quoteStyle)
285284
, blockDepth(blockDepth)
286285
{
287-
LUAU_ASSERT(quoteStyle != CstExprConstantString::QuotedInterp);
286+
LUAU_ASSERT(quoteStyle != CstExprConstantString::QuoteStyle::QuotedInterp);
288287
}
289288

290289
CstTypeGroup::CstTypeGroup(Position closePosition)

0 commit comments

Comments
 (0)