Cocoa fixes
parent
8411ad63e8
commit
f254d719ea
|
@ -11,7 +11,8 @@ TUPLE: comment node text ;
|
|||
|
||||
M: comment pprint* ( ann -- )
|
||||
"( " over comment-text " )" append3
|
||||
swap comment-node presented associate text ;
|
||||
swap comment-node presented associate
|
||||
[ text ] with-style ;
|
||||
|
||||
: comment, ( ? node text -- )
|
||||
rot [ <comment> , ] [ 2drop ] if ;
|
||||
|
|
|
@ -21,4 +21,4 @@ USING: compiler io parser sequences words ;
|
|||
] each
|
||||
|
||||
"Compiling Cocoa bindings..." print
|
||||
{ "cocoa" "objc" "objc-classes" } compile-vocabs
|
||||
{ "cocoa" "objc" "objc-classes" "gadgets" } compile-vocabs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
IN: objc
|
||||
USING: alien arrays errors hashtables inference kernel math
|
||||
namespaces parser sequences strings words ;
|
||||
USING: alien arrays compiler errors generic hashtables inference
|
||||
kernel math namespaces parser sequences strings words ;
|
||||
|
||||
: make-alien-invoke [ ] make \ alien-invoke add ; inline
|
||||
|
||||
|
@ -46,8 +46,8 @@ H{ } clone super-msg-senders set-global
|
|||
] keep
|
||||
[ set-objc-super-receiver ] keep ;
|
||||
|
||||
: make-stret-quot ( returns -- quot )
|
||||
[ <c-object> dup ] curry 1 make-dip ;
|
||||
: make-stret-quot ( method -- quot )
|
||||
first [ <c-object> dup ] curry 1 make-dip ;
|
||||
|
||||
TUPLE: selector name object ;
|
||||
|
||||
|
@ -94,15 +94,18 @@ H{ } clone objc-methods set-global
|
|||
: compile-send-error
|
||||
"Objective C message sends must be compiled" throw ;
|
||||
|
||||
: send ( ... selector -- ... ) compile-send-error ;
|
||||
: (send) ( ... selector super? -- ... )
|
||||
make-objc-send dup peek compile call ;
|
||||
|
||||
\ send [ f infer-send ] "infer" set-word-prop
|
||||
\ (send) [ pop-literal nip infer-send ] "infer" set-word-prop
|
||||
|
||||
\ (send) [ [ object object ] [ ] ] "infer-effect" set-word-prop
|
||||
|
||||
: send ( ... selector -- ... ) f (send) ; inline
|
||||
|
||||
: -> scan parsed \ send parsed ; parsing
|
||||
|
||||
: super-send ( ... selector -- ... ) compile-send-error ;
|
||||
|
||||
\ super-send [ t infer-send ] "infer" set-word-prop
|
||||
: super-send ( ... selector -- ... ) t (send) ; inline
|
||||
|
||||
: SUPER-> scan parsed \ super-send parsed ; parsing
|
||||
|
||||
|
|
Loading…
Reference in New Issue