@@ -689,6 +689,46 @@ export default class Parser {
689
689
rustType . swiftRawSignature = 'UInt64' ;
690
690
rustType . kind = RustKind . Primitive ;
691
691
}
692
+ } else if ( relevantTypeLine . startsWith ( 'int8_t' ) ) {
693
+ rustType = new RustPrimitive ( ) ;
694
+ typelessLineRemainder = relevantTypeLine . substring ( 'int8_t' . length ) . trim ( ) ;
695
+ if ( rustType instanceof RustPrimitive ) {
696
+ rustType . cSignature = 'int8_t' ;
697
+ rustType . swiftRawSignature = 'Int8' ;
698
+ rustType . kind = RustKind . Primitive ;
699
+ }
700
+ } else if ( relevantTypeLine . startsWith ( 'intptr_t' ) ) {
701
+ rustType = new RustPrimitive ( ) ;
702
+ typelessLineRemainder = relevantTypeLine . substring ( 'intptr_t' . length ) . trim ( ) ;
703
+ if ( rustType instanceof RustPrimitive ) {
704
+ rustType . cSignature = 'intptr_t' ;
705
+ rustType . swiftRawSignature = 'Int' ;
706
+ rustType . kind = RustKind . Primitive ;
707
+ }
708
+ } else if ( relevantTypeLine . startsWith ( 'int16_t' ) ) {
709
+ rustType = new RustPrimitive ( ) ;
710
+ typelessLineRemainder = relevantTypeLine . substring ( 'int16_t' . length ) . trim ( ) ;
711
+ if ( rustType instanceof RustPrimitive ) {
712
+ rustType . cSignature = 'int16_t' ;
713
+ rustType . swiftRawSignature = 'Int16' ;
714
+ rustType . kind = RustKind . Primitive ;
715
+ }
716
+ } else if ( relevantTypeLine . startsWith ( 'int32_t' ) ) {
717
+ rustType = new RustPrimitive ( ) ;
718
+ typelessLineRemainder = relevantTypeLine . substring ( 'int32_t' . length ) . trim ( ) ;
719
+ if ( rustType instanceof RustPrimitive ) {
720
+ rustType . cSignature = 'int32_t' ;
721
+ rustType . swiftRawSignature = 'Int32' ;
722
+ rustType . kind = RustKind . Primitive ;
723
+ }
724
+ } else if ( relevantTypeLine . startsWith ( 'int64_t' ) ) {
725
+ rustType = new RustPrimitive ( ) ;
726
+ typelessLineRemainder = relevantTypeLine . substring ( 'int64_t' . length ) . trim ( ) ;
727
+ if ( rustType instanceof RustPrimitive ) {
728
+ rustType . cSignature = 'int64_t' ;
729
+ rustType . swiftRawSignature = 'Int64' ;
730
+ rustType . kind = RustKind . Primitive ;
731
+ }
692
732
} else if ( relevantTypeLine . startsWith ( 'bool' ) ) {
693
733
rustType = new RustPrimitive ( ) ;
694
734
typelessLineRemainder = relevantTypeLine . substring ( 'bool' . length ) . trim ( ) ;
@@ -960,7 +1000,7 @@ export default class Parser {
960
1000
*
961
1001
*/
962
1002
963
- const METHOD_TYPE_ASSOCIATION_PREFIX_REGEX = / ^ ( [ A - Z ] [ a - z A - Z 0 - 9 ] * ) ( _ ( [ A - Z _ ] [ a - z A - Z 0 - 9 ] * ) ) * ( _ ( u 5 | u 8 | u 1 6 | u 3 2 | u 6 4 | u 1 2 8 | u s i z e | b o o l ) [ a - z A - Z 0 - 9 ] + ) ? / ;
1003
+ const METHOD_TYPE_ASSOCIATION_PREFIX_REGEX = / ^ ( [ A - Z ] [ a - z A - Z 0 - 9 ] * ) ( _ ( [ A - Z _ ] [ a - z A - Z 0 - 9 ] * ) ) * ( _ ( i 5 | i 8 | i 1 6 | i 3 2 | i 6 4 | i 1 2 8 | u 5 | u 8 | u 1 6 | u 3 2 | u 6 4 | u 1 2 8 | u s i z e | b o o l ) [ a - z A - Z 0 - 9 ] + ) ? / ;
964
1004
const prefixMatches = METHOD_TYPE_ASSOCIATION_PREFIX_REGEX . exec ( name ) ;
965
1005
if ( ! prefixMatches ) {
966
1006
// debug('object-unassociated method name: %s', name);
0 commit comments