[Docstring-checkins] CVS: dps/dps statemachine.py,1.3,1.4
Status: Pre-Alpha
Brought to you by:
goodger
From: David G. <go...@us...> - 2001-08-22 04:08:27
|
Update of /cvsroot/docstring/dps/dps In directory usw-pr-cvs1:/tmp/cvs-serv12454/dps/dps Modified Files: statemachine.py Log Message: - Fixed bug in StateMachine.getunindented(). - Added startoffset parameter to StateMachineWS.getindented() (but I may be backing this off soon -- not the right solution). Index: statemachine.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/statemachine.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** statemachine.py 2001/08/17 01:57:28 1.3 --- statemachine.py 2001/08/22 04:08:22 1.4 *************** *** 293,297 **** if not line.strip(): break ! if line[1] == ' ': self.nextline(len(block) - 1) raise UnexpectedIndentationError(block, self.abslineno() + 1) --- 293,297 ---- if not line.strip(): break ! if line[0] == ' ': self.nextline(len(block) - 1) raise UnexpectedIndentationError(block, self.abslineno() + 1) *************** *** 684,688 **** return context, '', [] # neither blank line nor indented ! def getindented(self): """ Return an indented block and info. --- 684,688 ---- return context, '', [] # neither blank line nor indented ! def getindented(self, startoffset=0): """ Return an indented block and info. *************** *** 696,704 **** - whether or not it finished with a blank line. """ ! offset = self.abslineoffset() indented, indent, blankfinish = extractindented( ! self.inputlines[self.lineoffset:]) if indented: ! self.nextline(len(indented) - 1) # advance to last indented line while indented and not indented[-1].strip(): indented.pop() --- 696,705 ---- - whether or not it finished with a blank line. """ ! offset = self.abslineoffset() + startoffset indented, indent, blankfinish = extractindented( ! self.inputlines[self.lineoffset + startoffset:]) if indented: ! # advance to last indented line ! self.nextline(len(indented) - 1 + startoffset) while indented and not indented[-1].strip(): indented.pop() |