diff options
author | Mark Spruiell <mes@zeroc.com> | 2009-09-03 14:03:30 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2009-09-03 14:03:30 -0700 |
commit | ee4f02ccf6e41d1c453c124c7623f742c56b306e (patch) | |
tree | 797d2a2ba25d60f85a0fb503f64c959bb2ce9872 /cpp/src/Slice/Parser.cpp | |
parent | Partial fix for 4210 - Update to latest Berkeley DB 4.7.25 (diff) | |
download | ice-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.cpp | 18 |
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 { |