Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Add NQPAttribute attribute meta-object. Very basic for now - just hol…
Browse files Browse the repository at this point in the history
…ds a name.
  • Loading branch information
jnthn committed Oct 2, 2010
1 parent 5328d08 commit 2914f84
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ METAMODEL_OBJS = ../metamodel/rakudoobject$(O) ../metamodel/repr_registry$(O)
../metamodel/reprs/P6opaque$(O) ../metamodel/reprs/P6int$(O) \
../metamodel/reprs/P6str$(O) ../metamodel/reprs/P6num$(O)

HOW_SOURCES = src/metamodel/how/KnowHOWAttribute.pm src/metamodel/how/NQPClassHOW.pm
HOW_SOURCES = src/metamodel/how/KnowHOWAttribute.pm src/metamodel/how/NQPClassHOW.pm \
src/metamodel/how/NQPAttribute.pm
HOW_COMBINED = src/gen/how.pm


Expand Down
17 changes: 17 additions & 0 deletions src/metamodel/how/NQPAttribute.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
knowhow NQPAttribute {
has $!name;

method new(:$name!) {
my $attr := pir::repr_instance_of__PP(self);
$attr.BUILD(:name($name));
$attr
}

method BUILD(:$name) {
$!name := $name;
}

method name() {
$!name
}
}

0 comments on commit 2914f84

Please sign in to comment.