private ObjectName ResolveAliasReference(ObjectName alias)
{
if (alias.Parent != null)
return null;
var aliasName = alias.Name;
int matchCount = 0;
ObjectName matched = null;
foreach (var reference in expressionReferences) {
if (matchCount > 1)
throw new AmbiguousMatchException();
if (CompareStrings(aliasName, reference.Alias)) {
matched = new ObjectName(reference.Alias);
matchCount++;
}
}
return matched;
}