-USING:
- alien
- alien.c-types
- alien.destructors
- alien.libraries alien.libraries.finder
- alien.syntax
- assocs
- kernel
- sequences
- system ;
+USING: alien alien.c-types alien.destructors alien.libraries alien.libraries.finder
+alien.syntax assocs kernel sequences system ;
IN: python.ffi
<< "python" {
-USING:
- accessors arrays assocs
- calendar
- continuations
- destructors
- fry kernel
- math
- namespaces
- python python.ffi
- sequences
- strings tools.test ;
+USING: accessors arrays assocs calendar continuations destructors fry kernel
+math namespaces python python.ffi sequences strings tools.test ;
IN: python.tests
py-initialize
-USING:
- accessors
- alien alien.c-types alien.data
- arrays
- assocs
- fry
- grouping
- hashtables
- kernel
- namespaces
- python.ffi
- sequences
- strings
- words ;
+USING: accessors alien alien.c-types alien.data arrays assocs fry grouping
+hashtables kernel namespaces python.ffi sequences strings words ;
IN: python
QUALIFIED: math
-USING:
- assocs
- destructors
- fry
- kernel
- math
- namespaces
- python python.ffi python.syntax python.tests
- sequences
- tools.test ;
+USING: assocs destructors fry kernel math namespaces python python.ffi
+python.syntax python.tests sequences tools.test ;
IN: python.syntax.tests
! Define your own type conversions.
-USING:
- accessors
- arrays
- effects effects.parser
- formatting
- fry
- generalizations
- kernel
- lexer
- locals
- namespaces
- parser
- python python.ffi
- sequences sequences.generalizations
- vocabs.parser
- words ;
+USING: accessors arrays effects effects.parser formatting fry generalizations
+kernel lexer locals namespaces parser python python.ffi sequences
+sequences.generalizations vocabs.parser words ;
IN: python.syntax
py-initialize
effect quot [ define-inline ] bi ; inline
:: add-function ( function effect -- )
+ effect in>> { "ret" } <effect> :> py-effect
function "%s" effect [ factor>factor-quot ] make-function
function "|%s" effect [ py>factor-quot ] make-function
- function "|%s|" effect in>> { "ret" } <effect> [ py>py-quot ] make-function
- function "%s|" effect in>> { "ret" } <effect> [ factor>py-quot ] make-function
- ; inline
+ function "|%s|" py-effect [ py>py-quot ] make-function
+ function "%s|" py-effect [ factor>py-quot ] make-function ; inline
: parse-python-word ( -- )
scan-token dup ";" = [ drop ] [