mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
* Reduce the stack utilization of type checking. * Improve the error message that's reported when a delimiting comma is missing from a table literal. eg ```lua local t = { first = 1 second = 2 }```
32 lines
909 B
C++
32 lines
909 B
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#include "Luau/Connective.h"
|
|
|
|
namespace Luau
|
|
{
|
|
|
|
ConnectiveId ConnectiveArena::negation(ConnectiveId connective)
|
|
{
|
|
return NotNull{allocator.allocate(Negation{connective})};
|
|
}
|
|
|
|
ConnectiveId ConnectiveArena::conjunction(ConnectiveId lhs, ConnectiveId rhs)
|
|
{
|
|
return NotNull{allocator.allocate(Conjunction{lhs, rhs})};
|
|
}
|
|
|
|
ConnectiveId ConnectiveArena::disjunction(ConnectiveId lhs, ConnectiveId rhs)
|
|
{
|
|
return NotNull{allocator.allocate(Disjunction{lhs, rhs})};
|
|
}
|
|
|
|
ConnectiveId ConnectiveArena::equivalence(ConnectiveId lhs, ConnectiveId rhs)
|
|
{
|
|
return NotNull{allocator.allocate(Equivalence{lhs, rhs})};
|
|
}
|
|
|
|
ConnectiveId ConnectiveArena::proposition(DefId def, TypeId discriminantTy)
|
|
{
|
|
return NotNull{allocator.allocate(Proposition{def, discriminantTy})};
|
|
}
|
|
|
|
} // namespace Luau
|