forked from universal-ctags/ctags
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JavaScript: generate tags for empty properties with setting allowNullTag
In javascript it is legal to have e.g. {"": false}. With the original code the parser attempts to generate the tag for the empty string which produces warning. With setting allowNullTag member of tagEntryInfo, the parser can generate such tags without producing warnings. Actual tag emission is controlled by --extras=+{nulltag}. This commit is based on the commit in universal-ctags#4153. Co-Author: Masatake YAMATO <[email protected]>
- Loading branch information
Showing
7 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
Units/parser-javascript.r/js-extract-empty-property.d/args.ctags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--sort=no | ||
--extras=+{nulltag} | ||
--fields=+{extras} |
2 changes: 2 additions & 0 deletions
2
Units/parser-javascript.r/js-extract-empty-property.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
input.js /^var variable = { "": "value" };$/;" p variable:variable extras:nulltag | ||
variable input.js /^var variable = { "": "value" };$/;" v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var variable = { "": "value" }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--sort=no |
1 change: 1 addition & 0 deletions
1
Units/parser-javascript.r/js-skip-empty-property.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
variable input.js /^var variable = { "": "value" };$/;" v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var variable = { "": "value" }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters