Ticket #218: docStr-fix.patch
File docStr-fix.patch, 1.3 KB (added by hopscc, 12 years ago) |
---|
-
Source/CobraParser.cobra
298 298 quoteToken = tok 299 299 textParts.add(tok.text) 300 300 else 301 for l in textParts 302 if l.trim.endsWith('"""') 303 msg='Triplequotes at the end of a line are not a valid end of docString. A docString has its terminating triplequotes alone on a single line.' 304 .throwError('Missing docString ending. [msg]') 301 305 .throwError('Expecting more doc string contents or the end of the doc string instead of [tok].') 302 306 text = textParts.join('') 303 307 return text -
Tests/820-errors/100-lexing-and-parsing/406-doc-string.cobra
1 # .error. Missing docString ending 1 2 class Program 2 3 3 4 def main … … 8 9 This one also causes 9 10 it indigestion. """ 10 11 pass 11 # .error. Expecting more doc string contents or the end of the doc string instead of "DEDENT".