Пример #1
0
 /// <summary>
 /// Constructs the Software Word Use Model on the given node, using this Rule.
 /// </summary>
 /// <param name="node">The node to construct the SWUM on.</param>
 public override void ConstructSwum(ProgramElementNode node)
 {
     if (node is FieldDeclarationNode)
     {
         FieldDeclarationNode fdn = node as FieldDeclarationNode;
         fdn.Parse(this.Splitter);
         this.PosTagger.TagNounPhrase(fdn.ParsedName);
         fdn.AssignStructuralInformation(this.Splitter, this.PosTagger);
         //TODO: set fdn.Type.IsPrimitive
         fdn.SwumRuleUsed = this;
     }
     else
     {
         //TODO: return some sort of error indicator?
         Console.Error.WriteLine("FieldRule.ConstructSwum expected a FieldDeclarationNode, received a {0}", node.GetType());
     }
 }