Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Give Attribute the type and build attributes, and set them up in .^at…
…tributes.
  • Loading branch information
jnthn committed Jul 22, 2009
1 parent 03aa56f commit 94b741a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/parrot/ClassHOW.pir
Expand Up @@ -83,7 +83,15 @@ Attribute descriptors.
$S0 = shift attr_it
cur_attr_hash = attributes[$S0]
$S0 = cur_attr_hash['name']
cur_attr_info = attr_proto.'new'('name' => $S0)
$P0 = cur_attr_hash['type']
unless null $P0 goto type_done
$P0 = get_root_global [.RAKUDO_HLL], 'Object'
type_done:
$P1 = cur_attr_hash['init_value']
unless null $P1 goto build_done
$P1 = root_new [.RAKUDO_HLL; 'Failure']
build_done:
cur_attr_info = attr_proto.'new'('name' => $S0, 'type' => $P0, 'build' => $P1)
result_list.'push'(cur_attr_info)
goto attr_it_loop
attr_it_loop_end:
Expand Down
2 changes: 2 additions & 0 deletions src/setting/Attribute.pm
@@ -1,5 +1,7 @@
class Attribute {
has $.name;
has $.type;
has $.build;
}

# vim: ft=perl6

0 comments on commit 94b741a

Please sign in to comment.