Ignore:
Timestamp:
Dec 24, 2017, 12:05:36 PM (15 months ago)
Author:
cameron
Message:

Name::Type::Byte removed in favor of cc::Byte alphabet; other cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_name.h

    r5797 r5805  
    2222    using length_t = std::string::size_type;
    2323    enum class Type {
    24         Byte
    25         , Unicode
     24        Unicode
    2625        , UnicodeProperty
    2726        , Capture
     
    150149    }
    151150    else if (llvm::isa<CC>(cc)) {
    152         Name::Type ccType = llvm::cast<CC>(cc)->max_codepoint() <= 0x7F ? Name::Type::Byte : Name::Type::Unicode;
    153         return new Name(nullptr, 0, name.c_str(), name.length(), ccType, cc);
     151        return new Name(nullptr, 0, name.c_str(), name.length(), Name::Type::Unicode, cc);
    154152    }
    155153    else return new Name(nullptr, 0, name.c_str(), name.length(), Name::Type::Unknown, cc);
     
    157155
    158156inline Name * makeName(CC * const cc) {
    159     const bool ascii = cc->max_codepoint() <= 0x7F;
    160     const std::string name = cc->canonicalName(ascii ? CC_type::ByteClass : CC_type::UnicodeClass);
    161     return new Name(nullptr, 0, name.c_str(), name.length(), ascii ? Name::Type::Byte : Name::Type::Unicode, cc);
     157    const std::string name = cc->canonicalName(CC_type::UnicodeClass);
     158    return new Name(nullptr, 0, name.c_str(), name.length(), Name::Type::Unicode, cc);
    162159}
    163160
Note: See TracChangeset for help on using the changeset viewer.