| 655 | return line |
| 656 | |
| 657 | def _replaceCStrings(self, line): |
| 658 | while True: |
| 659 | match = re.search('(==|!=) *"', line) |
| 660 | if not match: |
| 661 | break |
| 662 | |
| 663 | if self._isInString(line, match.start()): |
| 664 | break |
| 665 | |
| 666 | res = self._parseStringComparison(line, match.start()) |
| 667 | if res is None: |
| 668 | break |
| 669 | |
| 670 | startPos = res[0] |
| 671 | endPos = res[1] |
| 672 | text = line[startPos + 1:endPos - 1] |
| 673 | line = line[:startPos] + 'MatchCompiler::makeConstStringBegin' +\ |
| 674 | text + 'MatchCompiler::makeConstStringEnd' + line[endPos:] |
| 675 | line = line.replace('MatchCompiler::makeConstStringBegin', 'MatchCompiler::makeConstString("') |
| 676 | line = line.replace('MatchCompiler::makeConstStringEnd', '")') |
| 677 | return line |
| 678 | |
| 679 | def convertFile(self, srcname, destname, line_directive): |
| 680 | self._reset() |