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

/**
 * Extracts parts from the source code basing on line number and column number.
 * _src: Source code to provide
 */
module.exports = function(_src) {
  var validateSrc = function(src) {
    if (!src) {
      throw 'Error: src cannot be null or undefined!';
    }
    return src;
  };
  
  var src = validateSrc(_src);

  return {
    /**
     * Extracts source code at provided line number and col number.
     * rs: Row start.
     * re: Row end.
     * cs: Col start.
     * ce: Col end.
     */
    at: function(rs, re, cs, ce) {
      
    }
  };
};

@@ -239,16 +239,35 @@
 if (!src
+ %7C%7C src.lenght %3C= 0
 ) %7B%0A    
@@ -304,11 +304,9 @@
 null
- or
+,
  und
@@ -311,16 +311,35 @@
 ndefined
+ or an empty string
 !';%0A    
@@ -610,22 +610,627 @@
 , ce) %7B%0A
-
       
+if (!rs %7C%7C typeof rs !== 'number') %7B%0A        throw 'Error: Row start must be a number!';%0A      %7D%0A      if (!re %7C%7C typeof re !== 'number') %7B%0A        throw 'Error: Row end must be a number!';%0A      %7D%0A      if (!cs %7C%7C typeof cs !== 'number') %7B%0A        throw 'Error: Col start must be a number!';%0A      %7D%0A      if (!ce %7C%7C typeof ce !== 'number') %7B%0A        throw 'Error: Col end must be a number!';%0A      %7D%0A      if (re %3C rs) %7B%0A        throw 'Error: Row end must be greater or equal than row start!';%0A      %7D%0A      if (ce %3C cs) %7B%0A        throw 'Error: Col end must be greater or equal than col start!';%0A      %7D
 %0A    %7D%0A 

Update source.js