getChar static method

  1. @preferInline
int getChar(
  1. ParseState state,
  2. int pos
)

Implementation

@preferInline
static int getChar(ParseState state, int pos) {
  if (pos < state.length) {
    final ch = state.source.codeUnitAt(pos);
    state.ch = ch;
    if (ch < 0xD800) {
      return ch;
    }

    return getChar32(state, pos);
  }

  return state.ch = eof;
}