Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: source/i18n/regeximp.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/i18n/regeximp.h ('k') | source/i18n/region.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // 1 //
2 // Copyright (C) 2012 International Business Machines Corporation 2 // Copyright (C) 2012 International Business Machines Corporation
3 // and others. All rights reserved. 3 // and others. All rights reserved.
4 // 4 //
5 // file: regeximp.cpp 5 // file: regeximp.cpp
6 // 6 //
7 // ICU Regular Expressions, 7 // ICU Regular Expressions,
8 // miscellaneous implementation functions. 8 // miscellaneous implementation functions.
9 // 9 //
10 10
11 #include "unicode/utypes.h" 11 #include "unicode/utypes.h"
12 12
13 #if !UCONFIG_NO_REGULAR_EXPRESSIONS 13 #if !UCONFIG_NO_REGULAR_EXPRESSIONS
14 #include "regeximp.h" 14 #include "regeximp.h"
15
16 #include "uassert.h"
17 #include "unicode/utf16.h" 15 #include "unicode/utf16.h"
18 16
19 U_NAMESPACE_BEGIN 17 U_NAMESPACE_BEGIN
20 18
21 CaseFoldingUTextIterator::CaseFoldingUTextIterator(UText &text) : 19 CaseFoldingUTextIterator::CaseFoldingUTextIterator(UText &text) :
22 fUText(text), fcsp(NULL), fFoldChars(NULL), fFoldLength(0) { 20 fUText(text), fcsp(NULL), fFoldChars(NULL), fFoldLength(0) {
23 fcsp = ucase_getSingleton(); 21 fcsp = ucase_getSingleton();
24 } 22 }
25 23
26 CaseFoldingUTextIterator::~CaseFoldingUTextIterator() {} 24 CaseFoldingUTextIterator::~CaseFoldingUTextIterator() {}
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 106
109 107
110 UBool CaseFoldingUCharIterator::inExpansion() { 108 UBool CaseFoldingUCharIterator::inExpansion() {
111 return fFoldChars != NULL; 109 return fFoldChars != NULL;
112 } 110 }
113 111
114 int64_t CaseFoldingUCharIterator::getIndex() { 112 int64_t CaseFoldingUCharIterator::getIndex() {
115 return fIndex; 113 return fIndex;
116 } 114 }
117 115
118 // Assemble a pcode instruction from the opcode and operand values.
119 // Out-of-range values should not occur - if they do it is from an internal
120 // error in the regex compiler.
121
122 // TODO: move into regexcmp, where it has access to fStatus.
123 // NOP cleanly if U_FAILURE.
124 // Set U_REGEX_INTERNAL_ERROR on bad operands.
125
126 int32_t URX_BUILD(int32_t type, int32_t val) {
127 if (type < 0 || type > 255) {
128 U_ASSERT(FALSE);
129 type = URX_RESERVED_OP;
130 }
131 if (val > 0x00ffffff) {
132 U_ASSERT(FALSE);
133 val = 0;
134 }
135 return (type << 24) | val;
136 }
137
138 116
139 U_NAMESPACE_END 117 U_NAMESPACE_END
140 118
141 #endif 119 #endif
142 120
OLDNEW
« no previous file with comments | « source/i18n/regeximp.h ('k') | source/i18n/region.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698