// Add the declaration d to the given scope. void declare(Context& cxt, Scope& scope, Decl& decl) { if (Overload_set* ovl = scope.lookup(decl.name())) declare(cxt, *ovl, decl); else scope.bind(decl); }
// Add the declaration d to the given scope. // // Note that this does not currently check to see if the declaration is // valid i.e., that it does not conflict a previous declaration. This is // only checkable if all declarations are fully elaborated (i.e., typed). void declare(Context& cxt, Scope& scope, Decl& decl) { if (Overload_set* ovl = scope.lookup(decl.name())) ovl->push_back(decl); else scope.bind(decl); }