#include "a.h" #include #include #include int a_isidstart(int c) { return c == '_' || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); } int a_isidcont(int c) { return a_isidstart(c) || (c >= '0' && c <= '9') || c == '.'; } i64 a_parsenum(const char *s, char **end) { /* Let strtoll handle the sign itself: hand-stripping '-' then * negating the result fails for LLONG_MIN because the positive * magnitude (2^63) doesn't fit in long long, strtoll clamps to * LLONG_MAX, and the negation lands one short. */ return (i64)strtoll(s, end, 0); }