A method and system for organizing nodes within a program tree. The system
allows various child node categories to be defined for node types of a
program tree. When a child node is added to a parent node, the system
identifies the category of the child node. The system then instantiates a
category data structure for the identified category. The system stores a
reference to the instantiated category data structure in the parent node
and stores a reference to the child node in the instantiated category
data structure.