CodeTree.weight() and CodeTree.chars() implemented.