Skip to content

Commit

Permalink
[CommandLine] Add a few TODO notes for things I want to do next
Browse files Browse the repository at this point in the history
  • Loading branch information
Whiteknight committed Aug 29, 2012
1 parent 38bb2e5 commit b0fd618
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commandline/ArgumentDef.winxed
Expand Up @@ -9,6 +9,8 @@ class Rosella.CommandLine.ArgumentDef
// depending on raw_defs format, and adding a factory to choose between // depending on raw_defs format, and adding a factory to choose between
// them // them


// TODO: We need to support "foo|f" and "foo|f=X" (where --foo is an alias for -f)

var raw_defs; // The raw argument definitions from the user var raw_defs; // The raw argument definitions from the user
var prepared_defs; // The prepared/processed argument definitions var prepared_defs; // The prepared/processed argument definitions


Expand All @@ -25,7 +27,6 @@ class Rosella.CommandLine.ArgumentDef
// definitions and the description message associated with each // definitions and the description message associated with each
function get_description(var sb = new 'StringBuilder') function get_description(var sb = new 'StringBuilder')
{ {
// TODO: Prepend a usage string with program name
var raw_defs = self.raw_defs; var raw_defs = self.raw_defs;
if (does(raw_defs, "hash")) if (does(raw_defs, "hash"))
self.__get_description_hash(raw_defs, sb); self.__get_description_hash(raw_defs, sb);
Expand Down Expand Up @@ -80,7 +81,6 @@ class Rosella.CommandLine.ArgumentDef
string desc = fixed_defs[arg]; string desc = fixed_defs[arg];
push(sb, " "); push(sb, " ");


// TODO: add dashes. -X and --xxx instead of X and xxx
push(sb, arg); push(sb, arg);
push(sb, repeat_string(" ", max - length(arg))); push(sb, repeat_string(" ", max - length(arg)));
push(sb, desc); push(sb, desc);
Expand Down
2 changes: 2 additions & 0 deletions src/commandline/Arguments.winxed
Expand Up @@ -25,6 +25,8 @@ class Rosella.CommandLine.Arguments
return self.program; return self.program;
} }


// TODO: Handle the case where: -abc = -a -b -c, where -a, -b and -c are all flags

function parse(var args, var arg_defs_obj) function parse(var args, var arg_defs_obj)
{ {
var arg_defs = arg_defs_obj.get_definitions(); var arg_defs = arg_defs_obj.get_definitions();
Expand Down

0 comments on commit b0fd618

Please sign in to comment.