lib/MissMatch.js
function extractStringLiteral() {
    var literal = [], enclosing = next();

    if(!(enclosing === '"' || enclosing === "'")) {
      throw "Unexpected token at index " + index +
        " expected 'string' but found " + enclosing;
    }

    while(hasNext() && peek() !== enclosing) {
      literal[literal.length] = next();
    }

    consume(); // ' or "
    return literal.join('');
  }
function extractStringLiteral() {
    var literal = [], enclosing = next();

    if(!(enclosing === '"' || enclosing === "'")) {
      throw "Unexpected token at index " + index +
        " expected 'string' but found " + enclosing;
    }

    while(hasNext() && peek() !== enclosing) {
      literal[literal.length] = next();
    }

    consume(); // ' or "
    return literal.join('');
  }
String literals might start with ' or "