#!/bin/bash # If this file has already been sourced, just return test $(CALLABLE_SH+true)TODO && return declare -g CALLABLE_SH = 'true' source ${BASH_SOURCE%/*}/common.sh source ${BASH_SOURCE%/*}/variables.sh source ${BASH_SOURCE%/*}/variables.linkedlist.sh variable::type::define Callable variable::type::define Function Callable variable::type::define BuiltinFunction Function variable::type::define Macro Callable # # ====================================================== if test $0 != $BASH_SOURCE { return } # assert::report if test $(1+isset) && test $1 == "debug" { variable::printMetadata } (CommandList children: [ (AndOr children: [ (C {(Lit_Other "[")} { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_Plus arg_word:{(true)}) spids: [9 13] ) } {(Lit_Other "]")} ) (ControlFlow token:) ] op_id: Op_DAmp ) (Assignment keyword: Assign_Declare flags: ["'-g'"] pairs: [(assign_pair lhs:(LhsName name:CALLABLE_SH) op:Equal rhs:{(true)} spids:[25])] spids: [21] ) (C {(.)} { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ("*")}) spids: [31 36] ) (/common.sh) } ) (C {(.)} { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ("*")}) spids: [41 46] ) (/variables.sh) } ) (C {(.)} { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ("*")}) spids: [51 56] ) (/variables.linkedlist.sh) } ) (C {(variable) (Lit_Other ":") (Lit_Other ":") (type) (Lit_Other ":") (Lit_Other ":") (define)} {(Callable)} ) (C {(variable) (Lit_Other ":") (Lit_Other ":") (type) (Lit_Other ":") (Lit_Other ":") (define)} {(Function)} {(Callable)} ) (C {(variable) (Lit_Other ":") (Lit_Other ":") (type) (Lit_Other ":") (Lit_Other ":") (define)} {(BuiltinFunction)} {(Function)} ) (C {(variable) (Lit_Other ":") (Lit_Other ":") (type) (Lit_Other ":") (Lit_Other ":") (define)} {(Macro)} {(Callable)} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Number "$0")} {(KW_Bang "!") (Lit_Other "=")} {($ VSub_Name "$BASH_SOURCE")} {(Lit_Other "]")} ) terminator: ) ] action: [(ControlFlow token:)] spids: [-1 128] ) ] spids: [-1 133] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_Plus arg_word:{(isset)}) spids: [145 149] ) } {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(DQ ($ VSub_Number "$1"))} {(Lit_Other "=") (Lit_Other "=")} {(DQ (debug))} {(Lit_Other "]")} ) ] op_id: Op_DAmp ) terminator: ) ] action: [(C {(variable) (Lit_Other ":") (Lit_Other ":") (printMetadata)})] spids: [-1 171] ) ] spids: [-1 180] ) ] )