sample-proxies/graphql-sample/graphql-proxy/apiproxy/resources/jsc/graphql.jsc.js
/**
     * Reads a number token from the source file, either a float
     * or an int depending on whether a decimal point appears.
     *
     * Int:   -?(0|[1-9][0-9]*)
     * Float: -?(0|[1-9][0-9]*)(\.[0-9]+)?((E|e)(+|-)?[0-9]+)?
     */
Reads a number token from the source file, either a float
or an int depending on whether a decimal point appears.


Reads a number token from the source file either a float or an int depending on whether a decimal point appears .
function readNumber(source, start, firstCode, line, col, prev) {
      var body = source.body;
      var code = firstCode;
      var position = start;
      var isFloat = false;
      if (code === 45) {
        code = charCodeAt.call(body, ++position);
      }
      if (code === 48) {
        code = charCodeAt.call(body, ++position);
        if (code >= 48 && code <= 57) {
          throw syntaxError(source, position, "Invalid number, unexpected digit after 0: ".concat(printCharCode(code), "."));
        }
      } else {
        position = readDigits(source, position, code);
        code = charCodeAt.call(body, position);
      }
      if (code === 46) {
        isFloat = true;
        code = charCodeAt.call(body, ++position);
        position = readDigits(source, position, code);
        code = charCodeAt.call(body, position);
      }
      if (code === 69 || code === 101) {
        isFloat = true;
        code = charCodeAt.call(body, ++position);
        if (code === 43 || code === 45) {
          code = charCodeAt.call(body, ++position);
        }
        position = readDigits(source, position, code);
      }
      return new Tok(isFloat ? TokenKind.FLOAT : TokenKind.INT, start, position, line, col, prev, slice.call(body, start, position));
    }
function readNumber ( source , start , firstCode , line , col , prev ) { var body = source . body ; var code = firstCode ; var position = start ; var isFloat = false ; if ( code === 45 ) { code = charCodeAt . call ( body , ++ position ) ; } if ( code === 48 ) { code = charCodeAt . call ( body , ++ position ) ; if ( code >= 48 && code <= 57 ) { throw syntaxError ( source , position , "Invalid number, unexpected digit after 0: " . concat ( printCharCode ( code ) , "." ) ) ; } } else { position = readDigits ( source , position , code ) ; code = charCodeAt . call ( body , position ) ; } if ( code === 46 ) { isFloat = true ; code = charCodeAt . call ( body , ++ position ) ; position = readDigits ( source , position , code ) ; code = charCodeAt . call ( body , position ) ; } if ( code === 69 || code === 101 ) { isFloat = true ; code = charCodeAt . call ( body , ++ position ) ; if ( code === 43 || code === 45 ) { code = charCodeAt . call ( body , ++ position ) ; } position = readDigits ( source , position , code ) ; } return new Tok ( isFloat ? TokenKind . FLOAT : TokenKind . INT , start , position , line , col , prev , slice . call ( body , start , position ) ) ; }
Reads a number token from the source file, either a float
 or an int depending on whether a decimal point appears.
Reads a number token from the source file either a float or an int depending on whether a decimal point appears .
// - // 0 // . // E e // + -