// AUTOGENERATED COPYRIGHT HEADER START // Copyright (C) 2025 Michael Fabian 'Xaymar' Dirks // AUTOGENERATED COPYRIGHT HEADER END #include "util.hpp" #include bool blitz::utility::is_symbol(int code) { switch (code) { case ';': // Comment case ':': // Command Separator case '=': // Equal case '<': // Less Than case '>': // Greater Than case '~': // Bitwise Not case '^': // Exponential (X ^ Y = pow(X, Y)) case '+': // Plus case '-': // Minus case '*': // Multiply case '/': // Divide case ',': // Parameter Separation case '%': // Integer Type case '#': // Real Type case '$': // String Type case '.': // Structured Type case '\\': // Structured Type Access case '[': // Blitz Arrays case ']': case '(': // Call, Grouping, Dim case ')': return true; default: return false; } return false; } bool blitz::utility::is_white_space(int code) { switch (code) { case ' ': case '\t': return true; default: return false; } return false; } bool blitz::utility::is_digit(int code) { return isdigit(code); } bool blitz::utility::is_alpha(int code) { return isalpha(code); } char blitz::utility::utf8_safe_tolower(char code) { if (code & 0b10000000) { // Exclude Unicode return code; } return (char)std::tolower(code); }