@@ -166,6 +166,49 @@ void Token::deleteNext(unsigned long index)
166166 *tokensBack = this ;
167167}
168168
169+ void Token::swapWithNext ()
170+ {
171+ if (_next) {
172+ Token temp (0 );
173+
174+ temp._str = _next->_str ;
175+ temp._type = _next->_type ;
176+ temp._flags = _next->_flags ;
177+ temp._varId = _next->_varId ;
178+ temp._fileIndex = _next->_fileIndex ;
179+ temp._link = _next->_link ;
180+ temp._scope = _next->_scope ;
181+ temp._function = _next->_function ;
182+ temp._originalName = _next->_originalName ;
183+ temp.values = _next->values ;
184+ temp._progressValue = _next->_progressValue ;
185+
186+ _next->_str = _str;
187+ _next->_type = _type;
188+ _next->_flags = _flags;
189+ _next->_varId = _varId;
190+ _next->_fileIndex = _fileIndex;
191+ _next->_link = _link;
192+ _next->_scope = _scope;
193+ _next->_function = _function;
194+ _next->_originalName = _originalName;
195+ _next->values = values;
196+ _next->_progressValue = _progressValue;
197+
198+ _str = temp._str ;
199+ _type = temp._type ;
200+ _flags = temp._flags ;
201+ _varId = temp._varId ;
202+ _fileIndex = temp._fileIndex ;
203+ _link = temp._link ;
204+ _scope = temp._scope ;
205+ _function = temp._function ;
206+ _originalName = temp._originalName ;
207+ values = temp.values ;
208+ _progressValue = temp._progressValue ;
209+ }
210+ }
211+
169212void Token::deleteThis ()
170213{
171214 if (_next) { // Copy next to this and delete next
0 commit comments