public void AssignStructuralInformation(IdSplitter splitter, Tagger tagger) {
if(splitter == null) { throw new ArgumentNullException("splitter"); }
if(tagger == null) { throw new ArgumentNullException("tagger"); }
if(this.Context == null) { throw new InvalidOperationException("Context property must be set prior to calling AssignStructuralInformation"); }
this.ParsedName.SetLocation(Location.Name);
if(!string.IsNullOrEmpty(Context.IdType)) {
this.ReturnType = new TypeNode(Context.IdType, Context.IdTypeIsPrimitive, splitter, tagger, Location.Return);
}
if(!string.IsNullOrEmpty(Context.DeclaringClass)) {
this.DeclaringClass = new TypeNode(Context.DeclaringClass, false, splitter, tagger, Location.OnClass);
}
this.FormalParameters = new List<VariableDeclarationNode>();
if(Context.FormalParameters.Count > 0) {
int pos = 0;
foreach(FormalParameterRecord paramRecord in Context.FormalParameters) {
this.FormalParameters.Add(new VariableDeclarationNode(paramRecord.Name, paramRecord.ParameterType, paramRecord.IsPrimitiveType, splitter, tagger, Location.Formal, pos));
pos++;
}
}
}