isIdentChar function

bool isIdentChar(
  1. int codeUnit
)

True if codeUnit is an ASCII identifier continuation character.

Shared with TokenGuard.wordBoundary and kept here so the interpreter doesn't need to duplicate the class definition.

Implementation

bool isIdentChar(int codeUnit) =>
    (codeUnit >= 0x30 && codeUnit <= 0x39) || // 0-9
    (codeUnit >= 0x41 && codeUnit <= 0x5A) || // A-Z
    (codeUnit >= 0x61 && codeUnit <= 0x7A) || // a-z
    codeUnit == 0x5F;