Skip to content

Commit

Permalink
Add subcommand stubs for dict command
Browse files Browse the repository at this point in the history
  • Loading branch information
perlpilot committed Dec 26, 2009
1 parent a876a19 commit e0c2cca
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GEN_SOURCES = \
src/Partcl/Grammar.pir \
src/Partcl/Operators.pir \
src/Partcl/commands/array.pir \
src/Partcl/commands/dict.pir \
src/Partcl/commands/file.pir \
src/Partcl/commands/info.pir \
src/Partcl/commands/interp.pir \
Expand Down
1 change: 1 addition & 0 deletions src/Partcl.pir
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
.include 'src/Partcl/Operators.pir'
.include 'src/Partcl/commands/main.pir'
.include 'src/Partcl/commands/array.pir'
.include 'src/Partcl/commands/dict.pir'
.include 'src/Partcl/commands/file.pir'
.include 'src/Partcl/commands/info.pir'
.include 'src/Partcl/commands/interp.pir'
Expand Down
49 changes: 49 additions & 0 deletions src/Partcl/commands/dict.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
our sub dict(*@args) {
if +@args < 1 {
error('wrong # args: should be "array option arrayName ?arg ...?"');
}

my @opts := <append create exists filter for get incr info keys lappend merge remove
replace set size unset update values with>;
my $cmd := _tcl::select_option(@opts, @args.shift(), 'subcommand');

if $cmd eq 'append' {
return '';
} elsif $cmd eq 'create' {
return '';
} elsif $cmd eq 'filter' {
return '';
} elsif $cmd eq 'for' {
return '';
} elsif $cmd eq 'get' {
return '';
} elsif $cmd eq 'incr' {
return '';
} elsif $cmd eq 'info' {
return '';
} elsif $cmd eq 'keys' {
return '';
} elsif $cmd eq 'lappend' {
return '';
} elsif $cmd eq 'merge' {
return '';
} elsif $cmd eq 'remove' {
return '';
} elsif $cmd eq 'replace' {
return '';
} elsif $cmd eq 'set' {
return '';
} elsif $cmd eq 'size' {
return '';
} elsif $cmd eq 'unset' {
return '';
} elsif $cmd eq 'update' {
return '';
} elsif $cmd eq 'values' {
return '';
} elsif $cmd eq 'with' {
return '';
}
}

# vim: filetype=perl6:

0 comments on commit e0c2cca

Please sign in to comment.