src/lib/Parser.js
/**
  Consumes a `SystemLiteral` if possible.

  A `SystemLiteral` is similar to an attribute value, but allows the characters
  `<` and `&` and doesn't replace references.

  @returns {string|false}
    Value of the `SystemLiteral` minus quotes, or `false` if nothing was
    consumed. An empty string indicates that a `SystemLiteral` was consumed but
    was empty.

  @see https://www.w3.org/TR/2008/REC-xml-20081126/#NT-SystemLiteral
  */
Consumes a `SystemLiteral` if possible.
Consumes a ` SystemLiteral ` if possible .
consumeSystemLiteral() {
    let { scanner } = this;
    let quote = scanner.consumeStringFast('"') || scanner.consumeStringFast("'");
    if (!quote) {
      return false;
    }
    let value = scanner.consumeUntilString(quote);
    this.validateChars(value);
    if (!scanner.consumeStringFast(quote)) {
      this.error('Missing end quote');
    }
    return value;
  }
consumeSystemLiteral ( ) { let { scanner } = this ; let quote = scanner . consumeStringFast ( '"' ) || scanner . consumeStringFast ( "'" ) ; if ( ! quote ) { return false ; } let value = scanner . consumeUntilString ( quote ) ; this . validateChars ( value ) ; if ( ! scanner . consumeStringFast ( quote ) ) { this . error ( 'Missing end quote' ) ; } return value ; }
Consumes a `SystemLiteral` if possible.
Consumes a ` SystemLiteral ` if possible .