/**
 * syntaxEnvironment.js
 * Andrea Tino - 2015
 */

/**
 * Main collection point for types to be rendered.
 */
module.exports = function() {
  var tsClass = require('./class.js');
  var tsInterface = require('./interface.js');
  var tsEnum = require('./enum.js');
  
  var classes = {};
  var interfaces = {};
  var enums = {};
  
  return {
    /**
     * Adds a class to the environment.
     * class: The class to add.
     */
    addClass: function(class) {
      
    },
    
    /**
     * Adds a interface to the environment.
     * interface: The interface to add.
     */
    addInterface: function(interface) {
      
    },
    
    /**
     * Adds an enum to the environment.
     * enum: The enum to add.
     */
    addEnum: function(enum) {
      
    }
  };
};

@@ -269,160 +269,380 @@
  %0A  
-var classes = %7B%7D;%0A  var interfaces = %7B%7D;%0A  var enums = %7B%7D;%0A  %0A  return %7B%0A    /**%0A     * Adds a class to the environment.%0A     * class: The class to add.
+// Configuration: %7B classIds = %5B%5D, interfaceIds = %5B%5D, enumIds = %5B%5D %7D%0A  var config = null;%0A  %0A  // Associative arrays: id -%3E Typescript mapper (ts%5BClass%7CInterface%7CEnum%5D)%0A  var classes = %7B%7D;%0A  var interfaces = %7B%7D;%0A  var enums = %7B%7D;%0A  %0A  return %7B%0A    /**%0A     * Initializes the module.%0A     * _config: Configuration: %0A     * %7B classIds = %5B%5D, interfaceIds = %5B%5D, enumIds = %5B%5D %7D
 %0A   
@@ -654,16 +654,18 @@
     
-addClass
+initialize
 : fu
@@ -671,21 +671,23 @@
 unction(
-class
+_config
 ) %7B%0A    
@@ -692,94 +692,267 @@
     
-%0A    %7D,%0A    %0A    /**%0A     * Adds a interface to the environment.%0A     * interface: The
+if (!_config) %7B%0A        throw 'Error: Configuration cannot be null or undefined!';%0A      %7D%0A      config = _config;%0A    %7D,%0A    %0A    /**%0A     * Builds TypeScript classes.%0A     */%0A    buildClasses: function() %7B%0A      %0A    %7D,%0A    %0A    /**%0A     * Builds TypeScript
  int
@@ -957,23 +957,17 @@
 nterface
- to add
+s
 .%0A     *
@@ -972,18 +972,20 @@
  */%0A    
-ad
+buil
 dInterfa
@@ -986,16 +986,17 @@
 nterface
+s
 : functi
@@ -998,25 +998,16 @@
 unction(
-interface
 ) %7B%0A    
@@ -1040,69 +1040,19 @@
   * 
-Adds an enum to the environment.%0A     * enum: The enum to add
+Build enums
 .%0A  
@@ -1065,15 +1065,18 @@
     
-ad
+buil
 dEnum
+s
 : fu
@@ -1082,20 +1082,16 @@
 unction(
-enum
 ) %7B%0A    

Update syntaxEnvironment.js