summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-09-03 14:03:30 -0700
committerMark Spruiell <mes@zeroc.com>2009-09-03 14:03:30 -0700
commitee4f02ccf6e41d1c453c124c7623f742c56b306e (patch)
tree797d2a2ba25d60f85a0fb503f64c959bb2ce9872 /cpp/src/Slice/Parser.cpp
parentPartial fix for 4210 - Update to latest Berkeley DB 4.7.25 (diff)
downloadice-ee4f02ccf6e41d1c453c124c7623f742c56b306e.tar.bz2
ice-ee4f02ccf6e41d1c453c124c7623f742c56b306e.tar.xz
ice-ee4f02ccf6e41d1c453c124c7623f742c56b306e.zip
bug 4229 - generate Python docstrings
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index e0392780adc..f671f588199 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -4936,7 +4936,22 @@ Slice::Unit::setComment(const string& comment)
string::size_type end = 0;
while(true)
{
- string::size_type begin = comment.find_first_not_of(" \t\r\n*", end);
+ string::size_type begin;
+ if(end == 0)
+ {
+ //
+ // Skip past the initial whitespace.
+ //
+ begin = comment.find_first_not_of(" \t\r\n*", end);
+ }
+ else
+ {
+ //
+ // Skip more whitespace but retain blank lines.
+ //
+ begin = comment.find_first_not_of(" \t*", end);
+ }
+
if(begin == string::npos)
{
break;
@@ -4949,6 +4964,7 @@ Slice::Unit::setComment(const string& comment)
{
_currentComment += comment.substr(begin, end + 1 - begin);
}
+ ++end;
}
else
{