feat(tooling): add --semantic_scopes flag to `kythe decor` command
@@ -121,6 +121,7 @@ type decorCommand struct {
dirtyFile string
refFormat string
extendsOverrides bool
+ semanticScopes bool
}
func (decorCommand) Name() string { return "decor" }
@@ -147,6 +148,7 @@ func (c *decorCommand) SetFlags(flag *flag.FlagSet) {
@$col@ -- anchor source's ending column offset`)
flag.BoolVar(&c.targetDefs, "target_definitions", false, "Whether to request definitions (@targetDef@ format marker) for each reference's target")
flag.BoolVar(&c.extendsOverrides, "extends_overrides", false, "Whether to request extends/overrides information")
+ flag.BoolVar(&c.semanticScopes, "semantic_scopes", false, "Whether to request semantic scope information")
}
func (c decorCommand) Run(ctx context.Context, flag *flag.FlagSet, api API) error {
req, err := c.baseRequest(flag)
@@ -156,6 +158,7 @@ func (c decorCommand) Run(ctx context.Context, flag *flag.FlagSet, api API) erro
req.References = true
req.TargetDefinitions = c.targetDefs
req.ExtendsOverrides = c.extendsOverrides
+ req.SemanticScopes = c.semanticScopes
req.Filter = []string{
facts.NodeKind,
facts.Subkind,
