GH-172: fix broxygen not merging bif and script identifier comments

Fixes GH-172
This commit is contained in:
Jon Siwek 2019-01-15 12:12:09 -06:00
parent 12f3ab303b
commit 6eee5ded61
6 changed files with 15 additions and 7 deletions

View file

@ -40,7 +40,6 @@ enum ErrorCode %{
CAF_ERROR = 100,
%}
## The possible states of a peer endpoint.
enum PeerStatus %{
INITIALIZING,
CONNECTING,

View file

@ -28,7 +28,6 @@ type Broker::QueryResult: record;
type Broker::BackendOptions: record;
## Enumerates the possible storage backends.
enum BackendType %{
MEMORY,
SQLITE,

View file

@ -211,7 +211,8 @@ void Manager::ModuleUsage(const string& path, const string& module)
IdentifierInfo* Manager::CreateIdentifierInfo(ID* id, ScriptInfo* script)
{
IdentifierInfo* rval = new IdentifierInfo(id, script);
auto prev = identifiers.GetInfo(id->Name());
IdentifierInfo* rval = prev ? prev : new IdentifierInfo(id, script);
rval->AddComments(comment_buffer);
comment_buffer.clear();
@ -224,8 +225,12 @@ IdentifierInfo* Manager::CreateIdentifierInfo(ID* id, ScriptInfo* script)
comment_buffer_map.erase(it);
}
all_info.push_back(rval);
identifiers.map[id->Name()] = rval;
if ( ! prev )
{
all_info.push_back(rval);
identifiers.map[id->Name()] = rval;
}
last_identifier_seen = rval;
if ( script )