source: icGREP/icgrep-devel/icgrep/re/re_any.h

Last change on this file was 5772, checked in by cameron, 7 months ago

resolveGraphemeMode

File size: 851 bytes
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef ANY_H
8#define ANY_H
9
10#include "re_re.h"
11#include "re_cc.h"
12#include "re_name.h"
13#include <UCD/unicode_set.h>
14#include <llvm/Support/Casting.h>
15
16namespace re {
17
18class Any : public RE {
19public:
20    static inline bool classof(const RE * re) {
21        return (re->getClassTypeId() == ClassTypeId::CC) && llvm::cast<CC>(re)->full();
22    }
23    static inline bool classof(const void *) {
24        return false;
25    }
26protected:
27    Any() : RE(ClassTypeId::Any) {}
28    virtual ~Any() {}
29};
30
31inline RE * makeAny() {
32    Name * dot = makeName(".", Name::Type::UnicodeProperty);
33    dot->setDefinition(makeCC(0, 0x10FFFF));
34    return dot;
35}
36
37}
38
39#endif // ANY_H
Note: See TracBrowser for help on using the repository browser.