|
3 | 3 |
|
4 | 4 | #include "Luau/Common.h" |
5 | 5 |
|
6 | | -LUAU_FASTFLAG(LuauNativeAttribute); |
7 | | - |
8 | | -// The default value here is 643 because the first release in which this was implemented is 644, |
9 | | -// and actively we want new changes to be off by default until they're enabled consciously. |
10 | | -// The flag is placed in AST project here to be common in all Luau libraries |
11 | | -LUAU_DYNAMIC_FASTINTVARIABLE(LuauTypeSolverRelease, 643) |
12 | | - |
13 | 6 | namespace Luau |
14 | 7 | { |
15 | 8 |
|
@@ -92,6 +85,11 @@ void AstExprConstantString::visit(AstVisitor* visitor) |
92 | 85 | visitor->visit(this); |
93 | 86 | } |
94 | 87 |
|
| 88 | +bool AstExprConstantString::isQuoted() const |
| 89 | +{ |
| 90 | + return quoteStyle == QuoteStyle::QuotedSimple || quoteStyle == QuoteStyle::QuotedRaw; |
| 91 | +} |
| 92 | + |
95 | 93 | AstExprLocal::AstExprLocal(const Location& location, AstLocal* local, bool upvalue) |
96 | 94 | : AstExpr(ClassIndex(), location) |
97 | 95 | , local(local) |
@@ -239,8 +237,6 @@ void AstExprFunction::visit(AstVisitor* visitor) |
239 | 237 |
|
240 | 238 | bool AstExprFunction::hasNativeAttribute() const |
241 | 239 | { |
242 | | - LUAU_ASSERT(FFlag::LuauNativeAttribute); |
243 | | - |
244 | 240 | for (const auto attribute : attributes) |
245 | 241 | { |
246 | 242 | if (attribute->type == AstAttr::Type::Native) |
@@ -760,11 +756,18 @@ void AstStatTypeAlias::visit(AstVisitor* visitor) |
760 | 756 | } |
761 | 757 | } |
762 | 758 |
|
763 | | -AstStatTypeFunction::AstStatTypeFunction(const Location& location, const AstName& name, const Location& nameLocation, AstExprFunction* body) |
| 759 | +AstStatTypeFunction::AstStatTypeFunction( |
| 760 | + const Location& location, |
| 761 | + const AstName& name, |
| 762 | + const Location& nameLocation, |
| 763 | + AstExprFunction* body, |
| 764 | + bool exported |
| 765 | +) |
764 | 766 | : AstStat(ClassIndex(), location) |
765 | 767 | , name(name) |
766 | 768 | , nameLocation(nameLocation) |
767 | 769 | , body(body) |
| 770 | + , exported(exported) |
768 | 771 | { |
769 | 772 | } |
770 | 773 |
|
|
0 commit comments