Skip to content

Commit

Permalink
JSON: emit full qualified tags
Browse files Browse the repository at this point in the history
Close universal-ctags#4164

The test input is taken from universal-ctags#4164 submitted by Karol
Jakusz-Gostomski.
  • Loading branch information
masatake committed Dec 30, 2024
1 parent a484466 commit 9dc0927
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions parsers/json.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ static void makeJsonTag (tokenInfo *const token, const jsonKind kind)
}

makeTagEntry (&e);

if (vStringLength (token->scope) > 0 && isXtagEnabled (XTAG_QUALIFIED_TAGS))
{
vString *qname = vStringNewCopy(token->scope);
vStringPut(qname, '.');
vStringCat(qname, token->string);
e.name = vStringValue(qname);
markTagExtraBit(&e, XTAG_QUALIFIED_TAGS);
makeTagEntry (&e);
vStringDelete (qname);
}
}

#define DEPTH_LIMIT 512
Expand Down

0 comments on commit 9dc0927

Please sign in to comment.