Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge remote branch 'moritz/small-features-spectets'
  • Loading branch information
sorear committed Feb 25, 2011
2 parents 857b7a1 + b3e2ace commit dbcf870
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/SAFE.setting
Expand Up @@ -756,6 +756,9 @@ my class Enum is Cool {
}
my class Pair is Enum {
method Str() {
$.key ~ "\t" ~ $.value
}
}
# }}}
# List utilities {{{
Expand All @@ -767,9 +770,11 @@ sub postcircumfix:<[ ]>(\$container, $index) {
$container.at-pos($index)
}
sub postcircumfix:<{ }>(\$container, $key, :$exists, :$delete) {
sub postcircumfix:<{ }>(\$container, $key, :$exists, :$delete, :$p, :$kv) {
$exists ?? $container.exists-key($key) !!
$delete ?? $container.delete-key($key) !!
$p ?? $key => $container.at-key($key) !!
$kv ?? ($key, $container.at-key($key)) !!
$container.at-key($key)
}
Expand Down
4 changes: 4 additions & 0 deletions t/spectest.data
Expand Up @@ -9,8 +9,10 @@ S02-builtin_data_types/nested_pairs.t
S02-builtin_data_types/parsing-bool.t
S02-builtin_data_types/subscripts_and_context.t
S02-lexical-conventions/unicode.t
S02-literals/hex_chars.t
S02-literals/pair-boolean.t
S02-literals/underscores.t
S02-names/identifier.t
S02-names_and_variables/contextual.t
S02-whitespace_and_comments/begin_end_pod.t
S02-whitespace_and_comments/pod-in-multi-line-exprs.t
Expand Down Expand Up @@ -51,6 +53,7 @@ S04-statements/while.t
S05-capture/subrule.t
S05-grammar/methods.t
S05-grammar/protoregex.t
S05-modifier/ignoreaccent.t
S05-interpolation/lexicals.t
S05-metachars/line-anchors.t
S05-metasyntax/changed.t
Expand All @@ -70,6 +73,7 @@ S12-methods/how.t
S29-any/cmp.t
S29-context/exit-in-if.t
S32-array/bool.t
S32-hash/pairs.t
S32-num/power.t
S32-str/append.t
S32-str/bool.t
Expand Down

0 comments on commit dbcf870

Please sign in to comment.