Skip to content

Commit

Permalink
Kconfig: consider def_(bool|tristate) keywords to fill typeref: fields
Browse files Browse the repository at this point in the history
Signed-off-by: Masatake YAMATO <[email protected]>
  • Loading branch information
masatake committed Aug 15, 2024
1 parent 76a0633 commit 3babfdb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Units/parser-kconfig.r/macros.d/expected.tags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CC input.kconfig /^CC := gcc$/;" v
CC_HAS_FOO input.kconfig /^config CC_HAS_FOO$/;" c
CC_HAS_FOO input.kconfig /^config CC_HAS_FOO$/;" c typeref:typename:bool
CONFIG_CC_HAS_FOO input.kconfig /^config CC_HAS_FOO$/;" c
CONFIG_CC_HAS_FOO_MODULE input.kconfig /^config CC_HAS_FOO$/;" c
stringify input.kconfig /^stringify = $(squote)$(quote)$1$(quote)$(squote)$/;" v
2 changes: 1 addition & 1 deletion Units/parser-kconfig.r/simple-kconfig.d/expected.tags
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ net/mptcp/Kconfig input-3.kconfig /^source "net\/mptcp\/Kconfig"$/;" k menu:Netw
NETWORK_SECMARK input-3.kconfig /^config NETWORK_SECMARK$/;" c menu:Networking options typeref:typename:bool roles:def
CONFIG_NETWORK_SECMARK input-3.kconfig /^config NETWORK_SECMARK$/;" c menu:Networking options roles:def
CONFIG_NETWORK_SECMARK_MODULE input-3.kconfig /^config NETWORK_SECMARK$/;" c menu:Networking options roles:def
NET_PTP_CLASSIFY input-3.kconfig /^config NET_PTP_CLASSIFY$/;" c menu:Networking options roles:def
NET_PTP_CLASSIFY input-3.kconfig /^config NET_PTP_CLASSIFY$/;" c menu:Networking options typeref:typename:bool roles:def
CONFIG_NET_PTP_CLASSIFY input-3.kconfig /^config NET_PTP_CLASSIFY$/;" c menu:Networking options roles:def
CONFIG_NET_PTP_CLASSIFY_MODULE input-3.kconfig /^config NET_PTP_CLASSIFY$/;" c menu:Networking options roles:def
NETWORK_PHY_TIMESTAMPING input-3.kconfig /^config NETWORK_PHY_TIMESTAMPING$/;" c menu:Networking options typeref:typename:bool roles:def
Expand Down
4 changes: 2 additions & 2 deletions optlib/kconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ extern parserDefinition* KconfigParser (void)
"{{\n"
" .\n"
"}}", NULL, false},
{"^[ \t]*(bool|boolean|hex|int|string|tristate)\\>", "",
{"^[ \t]*(def_)?(bool|boolean|hex|int|string|tristate)\\>", "",
"", "{exclusive}"
"{{\n"
" count 0 gt {\n"
" \\1 typeref:\n"
" \\2 typeref:\n"
" clear\n"
" } if\n"
"}}", NULL, false},
Expand Down
4 changes: 2 additions & 2 deletions optlib/kconfig.ctags
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
--regex-Kconfig=/^[ \t]*(menu)?config[ \t]+([A-Za-z0-9_]+)[ \t]*$/\2/c/{scope=ref}{{
.
}}
--regex-Kconfig=/^[ \t]*(bool|boolean|hex|int|string|tristate)\>///{exclusive}{{
--regex-Kconfig=/^[ \t]*(def_)?(bool|boolean|hex|int|string|tristate)\>///{exclusive}{{
count 0 gt {
\1 typeref:
\2 typeref:
clear
} if
}}
Expand Down

0 comments on commit 3babfdb

Please sign in to comment.