   ], cb
 
 
+# Generates JSON Schema representation for given array type node.
 handleArray = (arrayType, simpleTypeSpec, options, cb) ->
   cb null, type: 'array'
 
 
+# Generates JSON Schema representation for given primitive
+# type node (string, number, etc.).
 handlePrimitiveType = (primitiveType, simpleTypeSpec, options, cb) ->
   cb null, type: simpleTypeSpec.name
 
 
+# Generates JSON Schema representation for given type node.
 handleType = (type, options, cb) ->
   resolveType type, (err, simpleTypeSpec) ->
     return cb err if err

{resolveType} = require '../typeresolution'


listProperties = (objectType, cb) ->
  props = []
  for member in (objectType.sections or []) when member.type is 'member'

  cb null, schema


# Generates JSON Schema representation for given object type node.
handleObject = (objectType, simpleTypeSpec, options, cb) ->
  async.waterfall [
    (next) -> listProperties objectType, next
