Programmer Options #76
Aliases: Programmer Options
8 verbs · 13 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
actual | this none this | rxd | #76 | 5 |
show | this none this | rxd | #76 | 6 |
show_verb_args | this none this | rxd | #76 | 5 |
check_verb_args | this none this | rxd | #76 | 17 |
parse_verb_args | this none this | rxd | #76 | 15 |
show_@prop_flags | this none this | rxd | #76 | 6 |
check_@prop_flags | this none this | rxd | #76 | 0 |
parse_@prop_flags | this none this | rxd | #76 | 11 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
show_eval_time | #76 | rc | #36 | {"eval does not show ticks/seconds consumed.", "eval shows ticks/seconds consumed."} |
show_list_all_parens | #76 | rc | #36 | {"@list shows only necessary parentheses by default", "@list shows all parentheses by default"} |
show_list_no_numbers | #76 | rc | #36 | {"@list gives line numbers by default", "@list omits line numbers by default"} |
show_copy_expert | #76 | rc | #36 | {"@copy prints warning message.", "@copy omits warning message."} |
type_@prop_flags | #76 | rc | #36 | {2} |
names | #68 | r | #36 | {"list_all_parens", "list_no_numbers", "eval_time", "copy_expert", "verb_args", "@prop_flags"} |
_namelist | #68 | r | #36 | "!list_all_parens!list_no_numbers!eval_time!copy_expert!list_numbers!verb_args!@prop_flags!" |
extras | #68 | r | #36 | {"list_numbers"} |
namewidth | #68 | rc | #36 | 15 |
key | #1 | c | #36 | 0 |
aliases | #1 | rc | #36 | {"Programmer Options"} |
description | #1 | rc | #36 | {"Option package for $prog commands. See `help @prog-options'."} |
object_size | #1 | r | #36 | {5306, -1090650497} |
Ancestry
Ancestors (nearest first): #68 Generic Option Package → #1 Root Class
Children: none
Call graph
Source
actual
Referenced by
none
Source
1if (i = args[1] in {"list_numbers"}) 2return {{{"list_no_numbers"}[i], !args[2]}}; 3else 4return {args}; 5endif
show
Referenced by
none
Source
1if (o = (name = args[2]) in {"list_numbers"}) 2args[2] = {"list_no_numbers"}[o]; 3return {@pass(@args), tostr("(", name, " is a synonym for -", args[2], ")")}; 4else 5return pass(@args); 6endif
show_verb_args
Referenced by
none
Source
1if (value = this:get(@args)) 2return {value, {tostr("Default args for @verb: ", $string_utils:from_list(value, " "))}}; 3else 4return {0, {"Default args for @verb: none none none"}}; 5endif
check_verb_args
Referenced by
none
Source
1value = args[1]; 2if (typeof(value) != LIST) 3return "List expected"; 4elseif (length(value) != 3) 5return "List of length 3 expected"; 6elseif (!(value[1] in {"this", "none", "any"})) 7return tostr("Invalid dobj specification: ", value[1]); 8elseif (!((p = $code_utils:short_prep(value[2])) || (value[2] in {"none", "any"}))) 9return tostr("Invalid preposition: ", value[2]); 10elseif (!(value[3] in {"this", "none", "any"})) 11return tostr("Invalid iobj specification: ", value[3]); 12else 13if (p) 14value[2] = p; 15endif 16return {value}; 17endif
parse_verb_args
Referenced by
none
Source
1{oname, raw} = args; 2if (typeof(raw) == STR) 3raw = $string_utils:explode(raw, " "); 4elseif (typeof(raw) == INT) 5return raw ? {oname, {"this", "none", "this"}} | {oname, 0}; 6endif 7value = $code_utils:parse_argspec(@raw); 8if (typeof(value) != LIST) 9return tostr(value); 10elseif (value[2]) 11return tostr("I don't understand \"", $string_utils:from_list(value[2], " "), "\""); 12else 13value = {@value[1], "none", "none", "none"}[1..3]; 14return {oname, (value == {"none", "none", "none"}) ? 0 | value}; 15endif
show_@prop_flags
Referenced by
none
Source
1value = this:get(@args); 2if (value) 3return {value, {tostr("Default permissions for @property=`", value, "'.")}}; 4else 5return {0, {"Default permissions for @property=`rc'."}}; 6endif
check_@prop_flags
Referenced by
none
Source
No program (verb defined but unprogrammed).
parse_@prop_flags
Referenced by
none
Source
1{oname, raw} = args; 2if (typeof(raw) != STR) 3return "Must be a string composed of the characters `rwc'."; 4endif 5len = length(raw); 6for x in [1..len] 7if (!(raw[x] in {"r", "w", "c"})) 8return "Must be a string composed of the characters `rwc'."; 9endif 10endfor 11return {oname, raw};