code/vars

This commit is contained in:
Marc Beninca 2025-07-07 02:45:58 +02:00
parent 40bd26f9ce
commit 45f0ebbb9b
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 17 additions and 27 deletions

View file

@ -6,8 +6,18 @@
# │ code │ variables │
# ╰──────┴───────────╯
# path to the required parsing awk script
# cache for the parsing awk script
_rwx_code_awk="$(cat "${RWX_ROOT_SYSTEM}/code.awk")"
# cache for code aliases
_rwx_code_aliases=""
# cache for code aliases functions
_rwx_code_aliases_functions=""
# cache for code constants
_rwx_code_constants=""
# cache for code functions
_rwx_code_functions=""
# cache for code variables
_rwx_code_variables=""
# ╭──────┬───────╮
# │ code │ parts │
@ -19,6 +29,11 @@ rwx_code() {
echo "${_rwx_code}"
}
# show the cached awk script
rwx_code_awk() {
echo "${_rwx_code_awk}"
}
# show the cached aliases
#= rca
rwx_code_aliases() {
@ -31,11 +46,6 @@ rwx_code_aliases_functions() {
echo "${_rwx_code_aliases_functions}"
}
# show the cached awk script
rwx_code_awk() {
echo "${_rwx_code_awk}"
}
# show the cached constants
#= rcc
rwx_code_constants() {
@ -73,7 +83,7 @@ rwx_code_check() {
rwx_code_doc() {
local name="${1}"
[ -n "${name}" ] || return
printf "%s" "${_rwx_code}" |
rwx_code |
awk \
--assign action="doc" \
--assign target="${name}" \