packages/pug-parser/index.js
function Parser(tokens, options) {
  options = options || {};
  if (!Array.isArray(tokens)) {
    throw new Error('Expected tokens to be an Array but got "' + (typeof tokens) + '"');
  }
  if (typeof options !== 'object') {
    throw new Error('Expected "options" to be an object but got "' + (typeof options) + '"');
  }
  this.tokens = new TokenStream(tokens);
  this.filename = options.filename;
  this.src = options.src;
  this.inMixin = 0;
  this.plugins = options.plugins || [];
}
function Parser(tokens, options) {
  options = options || {};
  if (!Array.isArray(tokens)) {
    throw new Error('Expected tokens to be an Array but got "' + (typeof tokens) + '"');
  }
  if (typeof options !== 'object') {
    throw new Error('Expected "options" to be an object but got "' + (typeof options) + '"');
  }
  this.tokens = new TokenStream(tokens);
  this.filename = options.filename;
  this.src = options.src;
  this.inMixin = 0;
  this.plugins = options.plugins || [];
}
function Parser ( tokens , options ) { options = options || { } ; if ( ! Array . isArray ( tokens ) ) { throw new Error ( 'Expected tokens to be an Array but got "' + ( typeof tokens ) + '"' ) ; } if ( typeof options !== 'object' ) { throw new Error ( 'Expected "options" to be an object but got "' + ( typeof options ) + '"' ) ; } this . tokens = new TokenStream ( tokens ) ; this . filename = options . filename ; this . src = options . src ; this . inMixin = 0 ; this . plugins = options . plugins || [ ] ; }
Initialize `Parser` with the given input `str` and `filename`.

@param {String} str
@param {String} filename
@param {Object} options
@api public
Initialize Parser with the given input str and filename .