factor: change FUNCTION: and similar to not have trailing ;
parent
cdef03f182
commit
14ba179254
|
@ -36,7 +36,7 @@ CONSTANT: eleven 11
|
||||||
[ "not-word" parse-c-type ] [ error>> no-word-error? ] must-fail-with
|
[ "not-word" parse-c-type ] [ error>> no-word-error? ] must-fail-with
|
||||||
] with-file-vocabs
|
] with-file-vocabs
|
||||||
|
|
||||||
FUNCTION: void* alien-parser-function-effect-test ( int *arg1, float arg2 ) ;
|
FUNCTION: void* alien-parser-function-effect-test ( int *arg1, float arg2 )
|
||||||
|
|
||||||
{ ( arg1 arg2 -- void* ) } [
|
{ ( arg1 arg2 -- void* ) } [
|
||||||
\ alien-parser-function-effect-test "declared-effect" word-prop
|
\ alien-parser-function-effect-test "declared-effect" word-prop
|
||||||
|
@ -44,7 +44,7 @@ FUNCTION: void* alien-parser-function-effect-test ( int *arg1, float arg2 ) ;
|
||||||
|
|
||||||
{ t } [ \ alien-parser-function-effect-test inline? ] unit-test
|
{ t } [ \ alien-parser-function-effect-test inline? ] unit-test
|
||||||
|
|
||||||
FUNCTION-ALIAS: (alien-parser-function-effect-test) void* alien-parser-function-effect-test ( int *arg1, float arg2 ) ;
|
FUNCTION-ALIAS: (alien-parser-function-effect-test) void* alien-parser-function-effect-test ( int *arg1, float arg2 )
|
||||||
|
|
||||||
{ ( arg1 arg2 -- void* ) } [
|
{ ( arg1 arg2 -- void* ) } [
|
||||||
\ (alien-parser-function-effect-test) "declared-effect" word-prop
|
\ (alien-parser-function-effect-test) "declared-effect" word-prop
|
||||||
|
@ -52,7 +52,7 @@ FUNCTION-ALIAS: (alien-parser-function-effect-test) void* alien-parser-function-
|
||||||
|
|
||||||
{ t } [ \ (alien-parser-function-effect-test) inline? ] unit-test
|
{ t } [ \ (alien-parser-function-effect-test) inline? ] unit-test
|
||||||
|
|
||||||
CALLBACK: void* alien-parser-callback-effect-test ( int *arg1 float arg2 ) ;
|
CALLBACK: void* alien-parser-callback-effect-test ( int *arg1 float arg2 )
|
||||||
|
|
||||||
{ ( arg1 arg2 -- void* ) } [
|
{ ( arg1 arg2 -- void* ) } [
|
||||||
\ alien-parser-callback-effect-test "callback-effect" word-prop
|
\ alien-parser-callback-effect-test "callback-effect" word-prop
|
||||||
|
|
|
@ -120,7 +120,7 @@ PRIVATE>
|
||||||
scan-token "," ?tail drop
|
scan-token "," ?tail drop
|
||||||
parse-pointers [ types push ] [ names push ] bi*
|
parse-pointers [ types push ] [ names push ] bi*
|
||||||
scan-token
|
scan-token
|
||||||
] until drop ";" expect types names [ >array ] bi@ ;
|
] until drop types names [ >array ] bi@ ;
|
||||||
|
|
||||||
: function-quot ( return library function types -- quot )
|
: function-quot ( return library function types -- quot )
|
||||||
'[ _ _ _ _ alien-invoke ] ;
|
'[ _ _ _ _ alien-invoke ] ;
|
||||||
|
|
|
@ -38,7 +38,7 @@ ERROR: no-com-interface interface ;
|
||||||
dup word>> +com-interface-definitions+ get-global set-at ;
|
dup word>> +com-interface-definitions+ get-global set-at ;
|
||||||
|
|
||||||
: (parse-com-function) ( return name -- definition )
|
: (parse-com-function) ( return name -- definition )
|
||||||
")" scan-c-args
|
scan-c-args
|
||||||
[ pointer: void prefix ] [ "this" prefix ] bi*
|
[ pointer: void prefix ] [ "this" prefix ] bi*
|
||||||
<com-function-definition> ;
|
<com-function-definition> ;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ SYNTAX: CUDA-LIBRARY:
|
||||||
|
|
||||||
SYNTAX: CUDA-FUNCTION:
|
SYNTAX: CUDA-FUNCTION:
|
||||||
scan-token [ create-word-in current-cuda-library get ] keep
|
scan-token [ create-word-in current-cuda-library get ] keep
|
||||||
";" scan-c-args drop define-cuda-function ;
|
scan-c-args drop define-cuda-function ;
|
||||||
|
|
||||||
SYNTAX: CUDA-GLOBAL:
|
SYNTAX: CUDA-GLOBAL:
|
||||||
scan-token [ create-word-in current-cuda-library get ] keep
|
scan-token [ create-word-in current-cuda-library get ] keep
|
||||||
|
|
Loading…
Reference in New Issue