#ifndef V8_STRINGS_CHAR_PREDICATES_H_
#define V8_STRINGS_CHAR_PREDICATES_H_
#include "src/base/strings.h"
#include "src/strings/unicode.h"
namespace v8 {
namespace internal {
inline constexpr int AsciiAlphaToLower(base::uc32 c);
inline constexpr bool IsCarriageReturn(base::uc32 c);
inline constexpr bool IsLineFeed(base::uc32 c);
inline constexpr bool IsAsciiIdentifier(base::uc32 c);
inline constexpr bool IsAlphaNumeric(base::uc32 c);
inline constexpr bool IsDecimalDigit(base::uc32 c);
inline constexpr bool IsHexDigit(base::uc32 c);
inline constexpr bool IsOctalDigit(base::uc32 c);
inline constexpr bool IsBinaryDigit(base::uc32 c);
inline constexpr bool IsRegExpWord(base::uc32 c);
inline constexpr bool IsAsciiLower(base::uc32 ch);
inline constexpr bool IsAsciiUpper(base::uc32 ch);
inline constexpr base::uc32 ToAsciiUpper(base::uc32 ch);
inline constexpr base::uc32 ToAsciiLower(base::uc32 ch);
inline bool IsIdentifierStart(base::uc32 c);
#ifdef V8_INTL_SUPPORT
V8_EXPORT_PRIVATE bool IsIdentifierStartSlow(base::uc32 c);
#else
inline bool IsIdentifierStartSlow(base::uc32 c) {
return (c <= 0xFFFF) ? unibrow::ID_Start::Is(c) : false;
}
#endif
inline bool IsIdentifierPart(base::uc32 c);
#ifdef V8_INTL_SUPPORT
V8_EXPORT_PRIVATE bool IsIdentifierPartSlow(base::uc32 c);
#else
inline bool IsIdentifierPartSlow(base::uc32 c) {
if (c <= 0xFFFF) {
return unibrow::ID_Start::Is(c) || unibrow::ID_Continue::Is(c);
}
return false;
}
#endif
inline bool IsWhiteSpace(base::uc32 c);
#ifdef V8_INTL_SUPPORT
V8_EXPORT_PRIVATE bool IsWhiteSpaceSlow(base::uc32 c);
#else
inline bool IsWhiteSpaceSlow(base::uc32 c) {
return unibrow::WhiteSpace::Is(c);
}
#endif
inline bool IsWhiteSpaceOrLineTerminator(base::uc32 c);
inline bool IsWhiteSpaceOrLineTerminatorSlow(base::uc32 c) { … }
inline bool IsLineTerminatorSequence(base::uc32 c, base::uc32 next);
}
}
#endif