74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
const auto& context = p.resolver()->context();
// Create a local identity for the constant, from which the current identity will be visible.
// This is to avoid anything declared from within the using expression to leak outside,
// and also to make sure that whenever it will be parsed, it will have access to the current
// context in which it has been declared.
auto localIdentity = AppendToVectorTerm( context.identity(), *nameTerm );
context.env()->addTransitiveImport( context.identity(), localIdentity );
variant< vector< Term >, Term > content = move( toks );
bool bInUse = false;
auto UsingValProvider = [content, localIdentity, bInUse]( Env& e, const Term& identity, const Term& contextId, Term& result ) mutable
{
|
|
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
const auto& context = p.resolver()->context();
// Create a local identity for the constant, from which the current identity will be visible.
// This is to avoid anything declared from within the using expression to leak outside,
// and also to make sure that whenever it will be parsed, it will have access to the current
// context in which it has been declared.
auto localIdentity = AppendToVectorTerm( context.identity(), *nameTerm );
context.env()->addVisibilityRule( context.identity(), localIdentity );
variant< vector< Term >, Term > content = move( toks );
bool bInUse = false;
auto UsingValProvider = [content, localIdentity, bInUse]( Env& e, const Term& identity, const Term& contextId, Term& result ) mutable
{
|