From 38bcab046b9155e6fc3831318e32d07b1f232f05 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 11 Jul 2025 23:14:57 +0200 Subject: [PATCH] code/binaries --- sh/core/code.awk | 10 +--------- sh/core/code.sh | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sh/core/code.awk b/sh/core/code.awk index c21262f..3ed41ed 100644 --- a/sh/core/code.awk +++ b/sh/core/code.awk @@ -41,7 +41,7 @@ BEGIN { RE_FUNC = RE_SPACES "\\(" RE_SPACES "\\)" RE_SPACES "{" re["alias"] = RE_BEGIN "#=" RE_SPACES RE_VAR RE_END - RE_BINARY = RE_BEGIN "#\\|" RE_SPACES RE_VAR RE_END + re["binary"] = RE_BEGIN "#\\|" RE_SPACES RE_VAR RE_END RE_CLOSE = RE_BEGIN "}" RE_SPACES RE_END RE_COMMAND = RE_BEGIN "#/" RE_SPACES RE_VAR RE_END RE_COMMENT = RE_BEGIN "#" RE_ANY RE_END @@ -66,10 +66,6 @@ BEGIN { if (match($0, re[target], m)) { unique[m[1]] = "" } - } else if (action == "binaries") { - if (match($0, RE_BINARY, m)) { - binaries[m[1]] = "" - } } else if (action == "commands") { if (match($0, RE_COMMAND, m)) { print m[1] @@ -215,10 +211,6 @@ END { for (item in unique) { print item } - } else if (action == "binaries") { - for (binary in binaries) { - print binary - } } # FIXME tasks last module end } diff --git a/sh/core/code.sh b/sh/core/code.sh index 7d7e166..f4ca676 100644 --- a/sh/core/code.sh +++ b/sh/core/code.sh @@ -264,11 +264,11 @@ EOF # parse aliases _rwx_code_aliases="$(rwx_code_action_target "filter" "alias")" # parse binaries - _rwx_code_binaries="$(rwx_code_parse "binaries")" + _rwx_code_binaries="$(rwx_code_action_target "filter" "binary")" # parse commands _rwx_code_commands="$(rwx_code_parse "commands")" # parse constants - _rwx_code_constants="$(rwx_code_action_target "filter" "constants")" + _rwx_code_constants="$(rwx_code_action_target "filter" "constant")" # parse functions _rwx_code_functions="$(rwx_code_action_target "filter" "function")" # parse tasks