CiType LookupType(string name)
{
CiSymbol symbol = this.Symbols.TryLookup(name);
if (symbol is CiType)
return (CiType) symbol;
if (symbol is CiClass)
return new CiClassPtrType { Name = name, Class = (CiClass) symbol};
if (symbol == null) {
CiType unknown = new CiUnknownType();
unknown.Name = name;
return unknown;
}
throw new ParseException("{0} is not a type", name);
}