go: Mark package qualifier in marked source as an identifier.
Summary:
For package names to render correctly with the updated (and now consistent!)
rendering rules, we need to also tag the qualifying context as an identifier.
Reviewers: zarko, #core_team
Subscribers: #core_team
@@ -106,13 +106,16 @@ func (pi *PackageInfo) Emit(ctx context.Context, sink Sink, opts *EmitOptions) e
Kind: cpb.MarkedSource_IDENTIFIER,
PreText: ipath,
}},
- PostChildText: "/",
}
if p := strings.LastIndex(ipath, "/"); p > 0 {
ms.Child[0].PreText = ipath[p+1:]
ms.Child = append([]*cpb.MarkedSource{{
Kind: cpb.MarkedSource_CONTEXT,
+ Child: []*cpb.MarkedSource{{
+ Kind: cpb.MarkedSource_IDENTIFIER,
PreText: ipath[:p],
+ }},
+ PostChildText: "/",
}}, ms.Child...)
}
e.emitCode(pi.VName, ms)
