-
-
Save samcv/564739be643467135b488005ab104cd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/UCD-gen.p6 b/UCD-gen.p6 | |
index c1f54a6..087d9bc 100755 | |
--- a/UCD-gen.p6 | |
+++ b/UCD-gen.p6 | |
@@ -693,6 +693,7 @@ sub make-bitfield-rows { | |
my @code-to-prop-keys = %code-to-prop.keys.sort(+*); | |
say @code-to-prop-keys.VAR.name ~ Dump @code-to-prop-keys; | |
my @code-sorted-props = %prop-to-code.sort(+*.value).».key; | |
+ # double check it is as as it should be | |
for ^@code-sorted-props -> $elem { | |
my $p = %code-to-prop{$elem}; | |
say "elem $elem, p $p"; | |
@@ -706,17 +707,15 @@ sub make-bitfield-rows { | |
for @code-sorted-props -> $prop { | |
if %points{$point}{$prop}:exists { | |
if %binary-properties{$prop}:exists { | |
- nqp::push_s($bitfield-columns, nqp::unbox_s(%points{$point}{$prop} ?? '1' !! '0')); | |
+ nqp::push_s($bitfield-columns, %points{$point}{$prop} ?? '1' !! '0'); | |
} | |
elsif nqp::existskey($enum-prop-nqp, $prop) { | |
- my str $enum = nqp::base_I(nqp::decont(%points{$point}{$prop}), 10); | |
- my $enum-prop-nqp_prop := nqp::atkey($enum-prop-nqp, $prop); | |
+ my $enum := nqp::base_I(nqp::decont(%points{$point}{$prop}), 10); | |
# If the key exists we need to look up the value | |
- if nqp::existskey($enum-prop-nqp_prop, $enum) { | |
- my $e := nqp::atkey($enum-prop-nqp_prop, $enum); | |
+ if nqp::existskey(nqp::atkey($enum-prop-nqp, $prop), $enum) { | |
#say $e.WHAT; | |
#say $enum.WHAT; | |
- nqp::push_s($bitfield-columns, $e); | |
+ nqp::push_s($bitfield-columns, nqp::atkey(nqp::atkey($enum-prop-nqp, $prop), $enum)); | |
} | |
# If it doesn't exist it's an Int property. Eventually we should try and look | |
# up the enum type in the hash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment