parent
7b18618b3e
commit
986bf1b2f9
|
@ -4,7 +4,7 @@
|
||||||
USING: accessors arrays assocs combinators fry hashtables
|
USING: accessors arrays assocs combinators fry hashtables
|
||||||
io.pathnames io.sockets kernel lexer make math.parser
|
io.pathnames io.sockets kernel lexer make math.parser
|
||||||
namespaces peg.ebnf present sequences splitting strings
|
namespaces peg.ebnf present sequences splitting strings
|
||||||
strings.parser urls.encoding vocabs vocabs.loader ;
|
strings.parser urls.encoding vocabs.loader ;
|
||||||
|
|
||||||
IN: urls
|
IN: urls
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ PRIVATE>
|
||||||
[ protocol>> protocol-port ]
|
[ protocol>> protocol-port ]
|
||||||
tri or <inet>
|
tri or <inet>
|
||||||
] [ protocol>> ] bi
|
] [ protocol>> ] bi
|
||||||
secure-protocol? [ "urls.secure" ensure-vocab-loaded >secure-addr ] when ;
|
secure-protocol? [ >secure-addr ] when ;
|
||||||
|
|
||||||
: set-url-addr ( url addr -- url )
|
: set-url-addr ( url addr -- url )
|
||||||
[ host>> >>host ] [ port>> >>port ] bi ;
|
[ host>> >>host ] [ port>> >>port ] bi ;
|
||||||
|
|
|
@ -161,6 +161,3 @@ M: string require ( vocab -- )
|
||||||
|
|
||||||
: load-vocab ( name -- vocab )
|
: load-vocab ( name -- vocab )
|
||||||
[ require ] [ lookup-vocab ] bi ;
|
[ require ] [ lookup-vocab ] bi ;
|
||||||
|
|
||||||
: ensure-vocab-loaded ( name -- )
|
|
||||||
dup lookup-vocab [ drop ] [ require ] if ;
|
|
||||||
|
|
Loading…
Reference in New Issue