remove -J option from release
This commit is contained in:
parent
8b6a576713
commit
f9a3efce9a
5 changed files with 13 additions and 5 deletions
2
Makefile
2
Makefile
|
|
@ -17,7 +17,7 @@ CC=g++
|
|||
CXXFLAGS= -I$(IDIR) -Wall -std=c++20
|
||||
ifeq ($(DEBUG),true)
|
||||
# debugging flags
|
||||
CXXFLAGS += -g
|
||||
CXXFLAGS += -g -D DEBUG_MODE
|
||||
RODIR = $(ODIR)/debug
|
||||
else
|
||||
# release flags
|
||||
|
|
|
|||
|
|
@ -171,11 +171,13 @@ int main(int argc, char* argv[])
|
|||
list_fcts(sh, re_fct_exclude);
|
||||
else if(options["list-cmd"])
|
||||
list_cmds(sh, regex_null);
|
||||
// output
|
||||
#ifdef DEBUG_MODE
|
||||
else if(options['J'])
|
||||
{
|
||||
std::cout << gen_json_struc(sh) << std::endl;
|
||||
}
|
||||
#endif
|
||||
// output
|
||||
else
|
||||
{
|
||||
// post-listing modifiers
|
||||
|
|
|
|||
|
|
@ -20,7 +20,10 @@ ztd::option_set options( {
|
|||
ztd::option('c', "stdout", false, "Output result script to stdout"),
|
||||
ztd::option('e', "exec", false, "Directly execute script"),
|
||||
ztd::option("no-shebang", false, "Don't output shebang"),
|
||||
#ifdef DEBUG_MODE
|
||||
ztd::option("\r [Debugging]"),
|
||||
ztd::option('J', "json", false, "Output the json structure"),
|
||||
#endif
|
||||
ztd::option("\r [Processing]"),
|
||||
ztd::option('m', "minify", false, "Minify code without changing functionality"),
|
||||
ztd::option('M', "minify-full", false, "Enable all minifying features: -m --minify-quotes --minify-var --minify-fct --remove-unused"),
|
||||
|
|
|
|||
|
|
@ -519,6 +519,7 @@ std::string boolstring(bool in)
|
|||
return "false";
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MODE
|
||||
std::string gen_json_struc(_obj* o)
|
||||
{
|
||||
if(o==nullptr)
|
||||
|
|
@ -846,3 +847,4 @@ std::string gen_json_struc(_obj* o)
|
|||
}
|
||||
return gen_json(vec);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@
|
|||
#include "struc_helper.hpp"
|
||||
|
||||
const std::map<const std::string, const lxsh_fct> lxsh_extend_fcts = {
|
||||
{ "_lxsh_random", { "[K]", "Generate a random number between 0 and 2^(K*8). Default 2", RANDOM_SH} },
|
||||
{ "_lxsh_random_string", { "[N]", "Generate a random alphanumeric string of length N. Default 20", RANDOM_STRING_SH} },
|
||||
{ "_lxsh_random_tmpfile", { "[N]", "Get a random TMP filepath, with N random chars. Default 20", RANDOM_TMPFILE_SH, {"_lxsh_random_string"} } }
|
||||
{ "_lxsh_random", { "[K]", "Generate a random number between 0 and 2^(K*8). Default 2", RANDOM_SH} },
|
||||
{ "_lxsh_random_string", { "[N]", "Generate a random alphanumeric string of length N. Default 20", RANDOM_STRING_SH} },
|
||||
{ "_lxsh_random_tmpfile", { "[N]", "Get a random TMP filepath, with N random chars. Default 20", RANDOM_TMPFILE_SH, {"_lxsh_random_string"} }
|
||||
}
|
||||
};
|
||||
|
||||
const std::map<const std::string, const lxsh_fct> lxsh_array_fcts = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue