docs: function scanStringLiteral() {
          var str = '', quote, start, ch, unescaped, octToDec, octal = false;
  
          quote = source[index];
          assert((quote === '\'' || quote === '"'),
              'String literal must starts with a quote');
  
          start = index;
          ++index;
  
          while (index < length) {
              ch = source[index++];
  
              if (ch === quote) {
                  quote = '';
                  break;
              } else if (ch === '\\') {
                  ch = source[index++];
                  if (!ch || !isLineTerminator(ch.charCodeAt(0))) {
                      switch (ch) {
                      case 'u':
                      case 'x':
                          if (source[index] === '{') {
                              ++index;
                              str += scanUnicodeCodePointEscape();
                          } else {
                              unescaped = scanHexEscape(ch);
                              if (!unescaped) {
                                  throw throwUnexpectedToken();
                              }
                              str += unescaped;
                          }
                          break;
                      case 'n':
                          str += '\n';
                          break;
                      case 'r':
                          str += '\r';
                          break;
                      case 't':
                          str += '\t';
                          break;
                      case 'b':
                          str += '\b';
                          break;
                      case 'f':
                          str += '\f';
                          break;
                      case 'v':
                          str += '\x0B';
                          break;
                      case '8':
                      case '9':
                          str += ch;
                          tolerateUnexpectedToken();
                          break;
  
                      default:
                          if (isOctalDigit(ch)) {
                              octToDec = octalToDecimal(ch);
  
                              octal = octToDec.octal || octal;
                              str += String.fromCharCode(octToDec.code);
                          } else {
                              str += ch;
                          }
                          break;
                      }
                  } else {
                      ++lineNumber;
                      if (ch === '\r' && source[index] === '\n') {
                          ++index;
                      }
                      lineStart = index;
                  }
              } else if (isLineTerminator(ch.charCodeAt(0))) {
                  break;
              } else {
                  str += ch;
              }
          }
  
          if (quote !== '') {
              throwUnexpectedToken();
          }
  
          return {
              type: Token.StringLiteral,
              value: str,
              octal: octal,
              lineNumber: startLineNumber,
              lineStart: startLineStart,
              start: start,
              end: index
          };
      }