thrift-parser
thrift-parser copied to clipboard
[discussion] keep block comments' original content?
Take part of this file as example:
/*
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
*/
namespace c_glib TTest
The comment block is parsed to:
{
"type": "CommentBlock",
"value": [
"with the License. You may obtain a copy of the License at",
"*",
" http://www.apache.org/licenses/LICENSE-2.0",
"*",
" Unless required by applicable law or agreed to in writing,"
]
}
The indent of http://www.apache.org/licenses/LICENSE-2.0 is intended, which is lost. Maybe it is better to keep block comments' original content?
Trying to parse the comment body was probably a mistake. Something I can look to add quickly is a new property rawValue that would have the unparsed comment.