Skip to content

Commit

Permalink
Stub for .read_array
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Jan 29, 2011
1 parent da8761d commit 4ebe287
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions lib/YAML/Tiny.pm
Expand Up @@ -201,16 +201,17 @@ method _read_scalar($string, $indent, @lines) {
# Parse an array # Parse an array
method _read_array($array, $indent, @lines) { method _read_array($array, $indent, @lines) {
while ( @lines ) {
# Check for a new document
if @lines[0] ~~ /^[\-\-\- | \.\.\. ]/ {
while @lines && !(@lines[0] ~~ /^\-\-\-/ ) {
@lines.shift;
}
return 1;
}
pir::die("_read_array not implemented"); pir::die("_read_array not implemented");
### while ( @$lines ) {
### # Check for a new document
### if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) {
### while ( @$lines and $lines->[0] !~ /^---/ ) {
### shift @$lines;
### }
### return 1;
### }
###
### # Check the indent level ### # Check the indent level
### $lines->[0] =~ /^(\s*)/; ### $lines->[0] =~ /^(\s*)/;
### if ( length($1) < $indent->[-1] ) { ### if ( length($1) < $indent->[-1] ) {
Expand Down Expand Up @@ -269,9 +270,9 @@ method _read_array($array, $indent, @lines) {
### } else { ### } else {
### pir::die \"YAML::Tiny failed to classify line '$lines->[0]'"; ### pir::die \"YAML::Tiny failed to classify line '$lines->[0]'";
### } ### }
### } }
###
### return 1; 1;
} }
# Parse an array # Parse an array
Expand Down

0 comments on commit 4ebe287

Please sign in to comment.