index.js
function(type, val){
    var res = {type: type, line: this.lineno, col: this.colno};

    if (val !== undefined) res.val = val;

    return res;
  }
function(type, val){
    var res = {type: type, line: this.lineno, col: this.colno};

    if (val !== undefined) res.val = val;

    return res;
  }
function ( type , val ) { var res = { type : type , line : this . lineno , col : this . colno } ; if ( val !== undefined ) res . val = val ; return res ; }
Construct a token with the given `type` and `val`.

@param {String} type
@param {String} val
@return {Object}
@api private
Construct a token with the given type and val .