mirror of
https://github.com/luau-lang/luau.git
synced 2025-01-09 21:09:10 +00:00
33 lines
909 B
C++
33 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
|