diff options
author | Maria Matejka <mq@ucw.cz> | 2023-06-13 09:39:29 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-09-12 15:47:24 +0200 |
commit | f86c86b7913f55c1221d8c5e1ff27700aa663a6e (patch) | |
tree | fb57686f11636843e22f2ae4966a5884df3eb807 /conf/gen_keywords.m4 | |
parent | 6b95353ebdaa724252492f941ebe75f80e9e545a (diff) |
Filter/Conf: Method names have their own keyword hash
To allow for future dynamic method definition, parsing method names is
done via a dedicated keyword hash/scope.
Diffstat (limited to 'conf/gen_keywords.m4')
-rw-r--r-- | conf/gen_keywords.m4 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/conf/gen_keywords.m4 b/conf/gen_keywords.m4 index 4e8651f6..06a38ffd 100644 --- a/conf/gen_keywords.m4 +++ b/conf/gen_keywords.m4 @@ -23,10 +23,11 @@ m4_define(CF_DECLS, `m4_divert(-1)') m4_define(CF_DEFINES, `m4_divert(-1)') # Keywords are translated to C initializers -m4_define(CF_handle_kw, `m4_divert(1){ "m4_translit($1,[[A-Z]],[[a-z]])", $1 }, +m4_define(CF_handle_kw, `m4_divert(1){ "m4_translit($1,[[A-Z]],[[a-z]])", $1, CF_keywd_target }, m4_divert(-1)') -m4_define(CF_keywd, `m4_ifdef([[CF_tok_$1]],,[[m4_define([[CF_tok_$1]],1)CF_handle_kw($1)]])') -m4_define(CF_KEYWORDS, `CF_iterate([[CF_keywd]], [[$@]])DNL') +m4_define(CF_keywd, `m4_ifdef([[CF_tok_]]CF_keywd_target[[_$1]],,[[m4_define([[CF_tok_]]CF_keywd_target[[_$1]],1)CF_handle_kw($1)]])') +m4_define(CF_KEYWORDS, `m4_define([[CF_keywd_target]],CFK_KEYWORDS)CF_iterate([[CF_keywd]], [[$@]])DNL') +m4_define(CF_METHODS, `m4_define([[CF_keywd_target]],CFK_METHODS)CF_iterate([[CF_keywd]], [[$@]])DNL') m4_define(CF_KEYWORDS_EXCLUSIVE, `CF_KEYWORDS($@)') # CLI commands generate keywords as well |