Lines Matching refs:token
31 inline bool IsHexNumber(const std::string_view &token)
33 for (auto i : token) {
41 inline bool IsBinaryNumber(const std::string_view &token)
43 for (auto i : token) {
51 inline bool IsOctalNumber(const std::string_view &token)
53 for (auto i : token) {
65 std::string_view token = p;
67 if (token.back() == '-' || token.back() == '+' || token.back() == 'x' || token == ".") {
71 if (token[0] == '-' || token[0] == '+') {
72 token.remove_prefix(1);
75 if (token[0] == '0' && token.size() > 1 && token.find('.') == std::string::npos) {
76 if (token[1] == 'x') {
77 token.remove_prefix(GENERAL_SHIFT);
78 return IsHexNumber(token);
81 if (token[1] == 'b') {
82 token.remove_prefix(GENERAL_SHIFT);
83 return (!token.empty() && IsBinaryNumber(token));
86 if (token[1] >= '0' && token[1] <= '9' && token.find('e') == std::string::npos) {
87 token.remove_prefix(1);
88 return IsOctalNumber(token);
92 for (auto i : token) {
133 std::string_view token = p;
135 if (ValidateInteger(token)) {
139 if (token[0] == '-' || token[0] == '+') {
140 token.remove_prefix(1);
147 for (auto i : token) {