Permalink
Browse files

A little setting re-ordering; put NQPStr first, since we need strings…

… early on in the bootstrap.
  • Loading branch information...
1 parent c20047e commit 3e7ec365102c0ed75c1ff3aebcf8871f2f090241 @jnthn committed Aug 20, 2010
Showing with 13 additions and 13 deletions.
  1. +13 −13 common/NQP/NQPSetting.pm
View
@@ -1,32 +1,32 @@
-knowhow NQPInt is repr('P6int') {
+knowhow NQPStr is repr('P6str') {
method new() {
nqp::instance_of(self.WHAT);
}
method Bool() {
- nqp::logical_not_int(nqp::equal_ints(self, 0, NQPInt), NQPInt)
- }
- method Int() {
- self
- }
- method Num() {
- nqp::coerce_int_to_num(self, NQPNum)
+ nqp::logical_not_int(nqp::equal_strs(self, "", NQPInt), NQPInt) &&
+ nqp::logical_not_int(nqp::equal_strs(self, "0", NQPInt), NQPInt)
}
method Str() {
- nqp::coerce_int_to_str(self, NQPStr)
+ self
}
}
-knowhow NQPStr is repr('P6str') {
+knowhow NQPInt is repr('P6int') {
method new() {
nqp::instance_of(self.WHAT);
}
method Bool() {
- nqp::logical_not_int(nqp::equal_strs(self, "", NQPInt), NQPInt) &&
- nqp::logical_not_int(nqp::equal_strs(self, "0", NQPInt), NQPInt)
+ nqp::logical_not_int(nqp::equal_ints(self, 0, NQPInt), NQPInt)
}
- method Str() {
+ method Int() {
self
}
+ method Num() {
+ nqp::coerce_int_to_num(self, NQPNum)
+ }
+ method Str() {
+ nqp::coerce_int_to_str(self, NQPStr)
+ }
}
knowhow NQPNum is repr('P6num') {

0 comments on commit 3e7ec36

Please sign in to comment.