private @Nullable NumberBinaryTag parseNumberTag(final String s, final char typeToken, final int radix, final boolean signed) {
    switch (typeToken) {
      case Tokens.TYPE_BYTE:
        return ByteBinaryTag.byteBinaryTag(this.parseByte(s, radix, signed));
      case Tokens.TYPE_SHORT:
        return ShortBinaryTag.shortBinaryTag(this.parseShort(s, radix, signed));
      case Tokens.TYPE_INT:
        return IntBinaryTag.intBinaryTag(this.parseInt(s, radix, signed));
      case Tokens.TYPE_LONG:
        return LongBinaryTag.longBinaryTag(this.parseLong(s, radix, signed));
      case Tokens.TYPE_FLOAT:
        final float floatValue = Float.parseFloat(s);
        if (Float.isFinite(floatValue)) { // don't accept NaN and Infinity
          return FloatBinaryTag.floatBinaryTag(floatValue);
        }
        break;
      case Tokens.TYPE_DOUBLE:
        final double doubleValue = Double.parseDouble(s);
        if (Double.isFinite(doubleValue)) { // don't accept NaN and Infinity
          return DoubleBinaryTag.doubleBinaryTag(doubleValue);
        }
        break;
    }
    return null;
  }
A tag that is definitely some sort of scalar.

<p>Does not detect quoted strings, so those should have been parsed already.</p>

@return a parsed tag
nbt/src/main/java/net/kyori/adventure/nbt/TagStringReader.java