| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 bool m_closed; | 410 bool m_closed; |
| 409 bool m_empty; | 411 bool m_empty; |
| 410 unsigned char m_fastPathFlags; | 412 unsigned char m_fastPathFlags; |
| 411 void (SegmentedString::*m_advanceFunc)(); | 413 void (SegmentedString::*m_advanceFunc)(); |
| 412 void (SegmentedString::*m_advanceAndUpdateLineNumberFunc)(); | 414 void (SegmentedString::*m_advanceAndUpdateLineNumberFunc)(); |
| 413 }; | 415 }; |
| 414 | 416 |
| 415 } | 417 } |
| 416 | 418 |
| 417 #endif | 419 #endif |
| OLD | NEW |