Mercurial > projects > dwt-addons
comparison dwtx/jface/text/rules/WordPatternRule.d @ 134:51e6e63f930e
Regex fix for casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:46:20 +0200 |
parents | 7d818bd32d63 |
children | 1a5b8f8129df |
comparison
equal
deleted
inserted
replaced
133:7d818bd32d63 | 134:51e6e63f930e |
---|---|
67 * @param startSequence the start sequence of the word pattern | 67 * @param startSequence the start sequence of the word pattern |
68 * @param endSequence the end sequence of the word pattern | 68 * @param endSequence the end sequence of the word pattern |
69 * @param token the token to be returned on success | 69 * @param token the token to be returned on success |
70 */ | 70 */ |
71 public this(IWordDetector detector, String startSequence, String endSequence, IToken token) { | 71 public this(IWordDetector detector, String startSequence, String endSequence, IToken token) { |
72 this(detector, startSequence, endSequence, token, (char)0); | 72 this(detector, startSequence, endSequence, token, cast(wchar)0); |
73 } | 73 } |
74 | 74 |
75 /** | 75 /** |
76 /** | 76 /** |
77 * Creates a rule for the given starting and ending word | 77 * Creates a rule for the given starting and ending word |
101 * @return <code>true</code> if the word ends on the given end sequence | 101 * @return <code>true</code> if the word ends on the given end sequence |
102 */ | 102 */ |
103 protected bool endSequenceDetected(ICharacterScanner scanner) { | 103 protected bool endSequenceDetected(ICharacterScanner scanner) { |
104 fBuffer.setLength(0); | 104 fBuffer.setLength(0); |
105 int c= scanner.read(); | 105 int c= scanner.read(); |
106 while (fDetector.isWordPart((char) c)) { | 106 while (fDetector.isWordPart(cast(wchar) c)) { |
107 fBuffer.append((char) c); | 107 fBuffer.append(cast(wchar) c); |
108 c= scanner.read(); | 108 c= scanner.read(); |
109 } | 109 } |
110 scanner.unread(); | 110 scanner.unread(); |
111 | 111 |
112 if (fBuffer.length() >= fEndSequence.length) { | 112 if (fBuffer.length() >= fEndSequence.length) { |