sample-proxies/graphql-sample/graphql-proxy/apiproxy/resources/jsc/graphql.jsc.js
/**
     * Reads a block string token from the source file.
     *
     * """("?"?(\\"""|\\(?!=""")|[^"\\]))*"""
     */
Reads a block string token from the source file.
Reads a block string token from the source file .
function readBlockString(source, start, line, col, prev, lexer) {
      var body = source.body;
      var position = start + 3;
      var chunkStart = position;
      var code = 0;
      var rawValue = '';
      while (position < body.length && (code = charCodeAt.call(body, position)) !== null) {
        if (code === 34 && charCodeAt.call(body, position + 1) === 34 && charCodeAt.call(body, position + 2) === 34) {
          rawValue += slice.call(body, chunkStart, position);
          return new Tok(TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, blockStringValue(rawValue));
        } 
        if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {
          throw syntaxError(source, position, "Invalid character within String: ".concat(printCharCode(code), "."));
        }
        if (code === 10) {
          ++position;
          ++lexer.line;
          lexer.lineStart = position;
        } else if (code === 13) {
          if (charCodeAt.call(body, position + 1) === 10) {
            position += 2;
          } else {
            ++position;
          }
          ++lexer.line;
          lexer.lineStart = position;
        } else if ( 
        code === 92 && charCodeAt.call(body, position + 1) === 34 && charCodeAt.call(body, position + 2) === 34 && charCodeAt.call(body, position + 3) === 34) {
          rawValue += slice.call(body, chunkStart, position) + '"""';
          position += 4;
          chunkStart = position;
        } else {
          ++position;
        }
      }
      throw syntaxError(source, position, 'Unterminated string.');
    }
function readBlockString ( source , start , line , col , prev , lexer ) { var body = source . body ; var position = start + 3 ; var chunkStart = position ; var code = 0 ; var rawValue = '' ; while ( position < body . length && ( code = charCodeAt . call ( body , position ) ) !== null ) { if ( code === 34 && charCodeAt . call ( body , position + 1 ) === 34 && charCodeAt . call ( body , position + 2 ) === 34 ) { rawValue += slice . call ( body , chunkStart , position ) ; return new Tok ( TokenKind . BLOCK_STRING , start , position + 3 , line , col , prev , blockStringValue ( rawValue ) ) ; } if ( code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d ) { throw syntaxError ( source , position , "Invalid character within String: " . concat ( printCharCode ( code ) , "." ) ) ; } if ( code === 10 ) { ++ position ; ++ lexer . line ; lexer . lineStart = position ; } else if ( code === 13 ) { if ( charCodeAt . call ( body , position + 1 ) === 10 ) { position += 2 ; } else { ++ position ; } ++ lexer . line ; lexer . lineStart = position ; } else if ( code === 92 && charCodeAt . call ( body , position + 1 ) === 34 && charCodeAt . call ( body , position + 2 ) === 34 && charCodeAt . call ( body , position + 3 ) === 34 ) { rawValue += slice . call ( body , chunkStart , position ) + '"""' ; position += 4 ; chunkStart = position ; } else { ++ position ; } } throw syntaxError ( source , position , 'Unterminated string.' ) ; }
Reads a block string token from the source file.
Reads a block string token from the source file .
// Closing Triple-Quote (""") // SourceCharacter // new line // carriage return // Escape Triple-Quote (\""")