Last active
October 20, 2016 15:40
Star
You must be signed in to star a gist
MeCab::NodePath
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
| use NativeCall; | |
| my class MeCab::Path is repr('CStruct') { ... } | |
| class MeCab::Node is repr('CStruct') { | |
| has MeCab::Node $.prev; | |
| has MeCab::Node $.next; | |
| has MeCab::Node $.enext; | |
| has MeCab::Node $.bnext; | |
| has MeCab::Path $.rpath; | |
| has MeCab::Path $.lpath; | |
| has Str $.surface; | |
| has Str $.feature; | |
| has uint32 $.id; | |
| has uint16 $.length; | |
| has uint16 $.rlength; | |
| has uint16 $.rcAttr; | |
| has uint16 $.lcAttr; | |
| has uint16 $.posid; | |
| has uint8 $.char_type; | |
| has uint8 $.stat; | |
| has uint8 $.isbest; | |
| has num32 $.alpha; | |
| has num32 $.beta; | |
| has num32 $.prob; | |
| has int16 $.wcost; | |
| has int64 $.cost; | |
| } | |
| class MeCab::Path is repr('CStruct') { | |
| has MeCab::Node $.rnode; | |
| has MeCab::Path $.rnext; | |
| has MeCab::Node $.lnode; | |
| has MeCab::Path $.lnext; | |
| has int32 $.cost; | |
| has num32 $.prob; | |
| } | |
| # Cannot change REPR of MeCab::Path now (must be set at initial declaration) | |
| # at /home/itoyota/Programs/p6-MeCab/lib/MeCab/Loadable.pm6 (MeCab::Loadable):29 | |
| # ------> class MeCab::Path is repr('CStruct')⏏ { | |
| # Dubious, test returned 1 (wstat 256, 0x100) | |
| # No subtests run | |
| # | |
| # Test Summary Report | |
| # ------------------- | |
| # ./t/01-basic.t (Wstat: 256 Tests: 0 Failed: 0) | |
| # Non-zero exit status: 1 | |
| # Parse errors: No plan found in TAP output | |
| # Files=1, Tests=0, 2 wallclock secs ( 0.01 usr 0.01 sys + 1.45 cusr 0.12 csys = 1.59 CPU) | |
| # Result: FAIL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment