code: function SourceCode(text, ast) {
  
      validate(ast);
  
      /**
       * The flag to indicate that the source code has Unicode BOM.
       * @type boolean
       */
      this.hasBOM = text.charCodeAt(0) === 0xFEFF;
  
     /**
       * The original text source code.
       * BOM was stripped from this text.
       * @type string
       */
      this.text = this.hasBOM ? text.slice(1) : text;
  
      /**
       * The parsed AST for the source code.
       * @type ASTNode
       */
      this.ast = ast;
  
      /**
       * The source code split into lines according to ECMA-262 specification.
       * This is done to avoid each rule needing to do so separately.
       * @type string[]
       */
      this.lines = SourceCode.splitLines(this.text);
  
      this.tokensAndComments = ast.tokens.concat(ast.comments).sort(function(left, right) {
          return left.range[0] - right.range[0];
      });
  
      // create token store methods
      var tokenStore = createTokenStore(ast.tokens);
      Object.keys(tokenStore).forEach(function(methodName) {
          this[methodName] = tokenStore[methodName];
      }, this);
  
      var tokensAndCommentsStore = createTokenStore(this.tokensAndComments);
  
      this.getTokenOrCommentBefore = tokensAndCommentsStore.getTokenBefore;
      this.getTokenOrCommentAfter = tokensAndCommentsStore.getTokenAfter;
  
      // don't allow modification of this object
      Object.freeze(this);
      Object.freeze(this.lines);
  }
docs: ------------------------------------------------------------------------------ Public Interface ------------------------------------------------------------------------------ 
  Represents parsed source code.
  @param {string} text The source code text.
  @param {ASTNode} ast The Program node of the AST representing the code.
  @constructor