OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 | 3 |
4 This library is free software; you can redistribute it and/or | 4 This library is free software; you can redistribute it and/or |
5 modify it under the terms of the GNU Library General Public | 5 modify it under the terms of the GNU Library General Public |
6 License as published by the Free Software Foundation; either | 6 License as published by the Free Software Foundation; either |
7 version 2 of the License, or (at your option) any later version. | 7 version 2 of the License, or (at your option) any later version. |
8 | 8 |
9 This library is distributed in the hope that it will be useful, | 9 This library is distributed in the hope that it will be useful, |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 void close(); | 183 void close(); |
184 | 184 |
185 void append(const SegmentedString&); | 185 void append(const SegmentedString&); |
186 void prepend(const SegmentedString&); | 186 void prepend(const SegmentedString&); |
187 | 187 |
188 bool excludeLineNumbers() const { return m_currentString.excludeLineNumbers(
); } | 188 bool excludeLineNumbers() const { return m_currentString.excludeLineNumbers(
); } |
189 void setExcludeLineNumbers(); | 189 void setExcludeLineNumbers(); |
190 | 190 |
191 void push(UChar c) | 191 void push(UChar c) |
192 { | 192 { |
| 193 ASSERT(c); |
| 194 |
193 if (!m_pushedChar1) { | 195 if (!m_pushedChar1) { |
194 m_pushedChar1 = c; | 196 m_currentChar = m_pushedChar1 = c; |
195 m_currentChar = m_pushedChar1 ? m_pushedChar1 : m_currentString.getC
urrentChar(); | |
196 updateSlowCaseFunctionPointers(); | 197 updateSlowCaseFunctionPointers(); |
197 } else { | 198 } else { |
198 ASSERT(!m_pushedChar2); | 199 ASSERT(!m_pushedChar2); |
199 m_pushedChar2 = c; | 200 m_pushedChar2 = m_pushedChar1; |
| 201 m_currentChar = m_pushedChar1 = c; |
200 } | 202 } |
201 } | 203 } |
202 | 204 |
203 bool isEmpty() const { return m_empty; } | 205 bool isEmpty() const { return m_empty; } |
204 unsigned length() const; | 206 unsigned length() const; |
205 | 207 |
206 bool isClosed() const { return m_closed; } | 208 bool isClosed() const { return m_closed; } |
207 | 209 |
208 enum LookAheadResult { | 210 enum LookAheadResult { |
209 DidNotMatch, | 211 DidNotMatch, |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 bool m_closed; | 419 bool m_closed; |
418 bool m_empty; | 420 bool m_empty; |
419 unsigned char m_fastPathFlags; | 421 unsigned char m_fastPathFlags; |
420 void (SegmentedString::*m_advanceFunc)(); | 422 void (SegmentedString::*m_advanceFunc)(); |
421 void (SegmentedString::*m_advanceAndUpdateLineNumberFunc)(); | 423 void (SegmentedString::*m_advanceAndUpdateLineNumberFunc)(); |
422 }; | 424 }; |
423 | 425 |
424 } | 426 } |
425 | 427 |
426 #endif | 428 #endif |
OLD | NEW |