Mercurial > python-cmd2
comparison cmd2.py @ 144:2d3477aa79d4
parsing tweaks
author | catherine@dellzilla |
---|---|
date | Tue, 18 Nov 2008 18:06:05 -0500 |
parents | f0fa9965a985 |
children | 0e0fc729e1a2 |
comparison
equal
deleted
inserted
replaced
143:f0fa9965a985 | 144:2d3477aa79d4 |
---|---|
256 | 256 |
257 if s[0] in self.shortcuts: | 257 if s[0] in self.shortcuts: |
258 s = self.shortcuts[s[0]] + ' ' + s[1:] | 258 s = self.shortcuts[s[0]] + ' ' + s[1:] |
259 result['statement'] = s | 259 result['statement'] = s |
260 result['parseable'] = s | 260 result['parseable'] = s |
261 # terminator = self.specialTerminators.get(command) or self.terminatorPattern | |
262 self.terminatorPattern.ignore(self.commentInProgress) | |
263 result += parseSearchResults(self.terminatorPattern, s) | 261 result += parseSearchResults(self.terminatorPattern, s) |
264 if result.terminator: | 262 if result.terminator: |
265 result['statement'] = result.upToIncluding | 263 result['statement'] = result.upToIncluding |
266 result['unterminated'] = result.before | 264 result['unterminated'] = result.before |
267 result['parseable'] = result.after | 265 result['parseable'] = result.after |