Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/Analysis/include/Luau/AstUtils.h
2727 views
1
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
2
#pragma once
3
4
#include "Luau/Ast.h"
5
#include "Luau/DenseHash.h"
6
#include "Luau/NotNull.h"
7
#include "Luau/TypeFwd.h"
8
9
namespace Luau
10
{
11
12
// Search through the expression 'expr' for typeArguments that are known to represent
13
// uniquely held references. Append these typeArguments to 'uniqueTypes'.
14
void findUniqueTypes(NotNull<DenseHashSet<TypeId>> uniqueTypes, AstExpr* expr, NotNull<const DenseHashMap<const AstExpr*, TypeId>> astTypes);
15
16
void findUniqueTypes(
17
NotNull<DenseHashSet<TypeId>> uniqueTypes,
18
AstArray<AstExpr*> exprs,
19
NotNull<const DenseHashMap<const AstExpr*, TypeId>> astTypes
20
);
21
void findUniqueTypes(
22
NotNull<DenseHashSet<TypeId>> uniqueTypes,
23
const std::vector<AstExpr*>& exprs,
24
NotNull<const DenseHashMap<const AstExpr*, TypeId>> astTypes
25
);
26
27
} // namespace Luau
28
29