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.
Kconfig: make regex patterns more strict not to be fooled
Unlike the real Kconfig processor in Linux, the Kconfig parser in ctags doesn't consider indentation. So the keywords like "menu", "endmenu", "choice", and "endchoice" in help messages can make the parser fooled. To mitigating the incompleteness of the parser, this change makes regex patterns more strict. Signed-off-by: Masatake YAMATO <[email protected]>
- Loading branch information
Showing
9 changed files
with
65 additions
and
12 deletions.
There are no files selected for viewing
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,5 @@ | ||
--sort=no | ||
--map-Kconfig=.kconfig | ||
--extras-Kconfig=-{configPrefixed} | ||
--fields=+e | ||
--extras=+r |
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,10 @@ | ||
A input.kconfig /^config A$/;" c typeref:typename:bool | ||
B input.kconfig /^config B$/;" c typeref:typename:bool | ||
Y input-0.kconfig /^menu "Y"$/;" m end:11 | ||
C input-0.kconfig /^config C$/;" c menu:Y typeref:typename:bool | ||
D input-0.kconfig /^config D$/;" c menu:Y typeref:typename:bool | ||
E input-1.kconfig /^config E$/;" c typeref:typename:bool | ||
F input-1.kconfig /^config F$/;" c typeref:typename:bool | ||
W input-2.kconfig /^choice W$/;" C end:8 | ||
G input-2.kconfig /^ config G$/;" c choice:W typeref:typename:bool | ||
H input-3.kconfig /^config H$/;" c typeref:typename:bool |
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,11 @@ | ||
menu "Y" | ||
|
||
config C | ||
bool | ||
help | ||
endmenu - a dummy | ||
|
||
config D | ||
bool | ||
|
||
endmenu |
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,8 @@ | ||
config E | ||
bool | ||
help | ||
choice Z0 or Z1 | ||
|
||
config F | ||
bool | ||
|
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,8 @@ | ||
choice W | ||
help | ||
endchoice but this is a part of help message | ||
|
||
config G | ||
bool | ||
|
||
endchoice |
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,4 @@ | ||
config H | ||
bool | ||
help | ||
source "V" is a part of a help message. |
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,7 @@ | ||
config A | ||
bool | ||
help | ||
menu "X" rest | ||
|
||
config B | ||
bool |
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
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