public void AddUsingExternalAlias (string alias, Location loc, Report Report)
{
// TODO: Do this in parser
bool not_first = using_clauses != null || DeclarationFound;
if (using_aliases != null && !not_first) {
foreach (UsingAliasEntry uae in using_aliases) {
if (uae is LocalUsingAliasEntry) {
not_first = true;
break;
}
}
}
if (not_first)
Report.Error (439, loc, "An extern alias declaration must precede all other elements");
if (alias == "global") {
Error_GlobalNamespaceRedefined (loc, Report);
return;
}
AddUsingAlias (new UsingAliasEntry (alias, loc));
}