souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
48 const std::vector<QualifiedName>& actualParams)
const {
50 if (formalParams.size() != actualParams.size()) {
54 for (std::size_t
i = 0;
i < formalParams.size();
i++) {
57 result.binding[formalParams[
i]] = pos->second;
59 result.binding[formalParams[
i]] = actualParams[
i];
71 std::map<QualifiedName, QualifiedName>
binding;
74 class ComponentLookupAnalysis :
public Analysis {
76 static constexpr
const char*
name =
"component-lookup";
const Component * getComponent(const Component *scope, const std::string &name, const TypeBinding &activeBinding) const
Performs a lookup operation for a component with the given name within the addressed scope.
TypeBinding extend(const std::vector< QualifiedName > &formalParams, const std::vector< QualifiedName > &actualParams) const
void run(const TranslationUnit &translationUnit) override
run analysis for a Ast translation unit
std::set< const Component * > globalScopeComponents
std::map< QualifiedName, QualifiedName > binding
Key value pair.
Translation unit class for the translation pipeline.
static constexpr const char * name
Class that encapsulates std::map of types binding that comes from .init c = Comp<MyType> Type binding...
std::map< const Component *, std::set< const Component * > > nestedComponents
Abstract class for a AST Analysis.
const QualifiedName & find(const QualifiedName &name) const
Returns binding for given name or empty string if such binding does not exist.
Qualified Name class defines fully/partially qualified names to identify objects in components.
ComponentLookupAnalysis()
std::map< const Component *, const Component * > enclosingComponent