     cb err, (type: typeName, enum: reprs unless err)
 
 
+# Builds JSON Schema representation for a group of items with primitive types
+# within enum *Element* node. Implements 'singleType' rendering strategy.
 buildEnumAsSingleTypeRepr = (group, cb) ->
   cb null, type: group.typeName
 
 
+# Builds JSON Schema representation for a group of items with primitive types
+# within enum *Element* node.
 buildEnumGroupRepr = (group, inherited, inline, cb) ->
   switch group.strategy
     when 'types'

    cb null, repr


groupItemsByPrimitiveTypes = (items, nestedTypeName, cb) ->
  async.waterfall [
    (next) -> resolveTypes items, nestedTypeName, next

  ], cb


# Helper function to inspect inline enum *Element* nodes. Creates one mostly
# artificial group object with almost only the values field populated.
inspectEnumInline = (enumElement, nestedTypeName, cb) ->
  if inspect.hasVariableValues enumElement
    values = []
