more H{ } make fixes.
parent
20613bc4e1
commit
3ea37a93eb
|
|
@ -373,10 +373,10 @@ SYMBOL: a
|
||||||
|
|
||||||
[ "4" ] [
|
[ "4" ] [
|
||||||
[
|
[
|
||||||
"4" "a" set
|
"4" "a" ,,
|
||||||
"http://localhost" add-addr "__u" set
|
"http://localhost" add-addr "__u" ,,
|
||||||
"session-id" get session-id-key set
|
"session-id" get session-id-key ,,
|
||||||
] H{ } make-assoc
|
] H{ } make
|
||||||
"http://localhost/" add-addr <post-request> "cookies" get >>cookies http-request nip test-a
|
"http://localhost/" add-addr <post-request> "cookies" get >>cookies http-request nip test-a
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
|
@ -385,10 +385,10 @@ SYMBOL: a
|
||||||
! Test flash scope
|
! Test flash scope
|
||||||
[ "xyz" ] [
|
[ "xyz" ] [
|
||||||
[
|
[
|
||||||
"xyz" "a" set
|
"xyz" "a" ,,
|
||||||
"http://localhost" add-addr "__u" set
|
"http://localhost" add-addr "__u" ,,
|
||||||
"session-id" get session-id-key set
|
"session-id" get session-id-key ,,
|
||||||
] H{ } make-assoc
|
] H{ } make
|
||||||
"http://localhost/" add-addr <post-request> "cookies" get >>cookies http-request nip test-a
|
"http://localhost/" add-addr <post-request> "cookies" get >>cookies http-request nip test-a
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ SYNTAX: MATCH-VARS: ! vars ...
|
||||||
dup word? [ "match-var" word-prop ] [ drop f ] if ;
|
dup word? [ "match-var" word-prop ] [ drop f ] if ;
|
||||||
|
|
||||||
: set-match-var ( value var -- ? )
|
: set-match-var ( value var -- ? )
|
||||||
dup namespace key? [ get = ] [ set t ] if ;
|
dup building get key? [ get = ] [ ,, t ] if ;
|
||||||
|
|
||||||
: (match) ( value1 value2 -- matched? )
|
: (match) ( value1 value2 -- matched? )
|
||||||
{
|
{
|
||||||
|
|
@ -40,7 +40,7 @@ SYNTAX: MATCH-VARS: ! vars ...
|
||||||
} cond ;
|
} cond ;
|
||||||
|
|
||||||
: match ( value1 value2 -- bindings )
|
: match ( value1 value2 -- bindings )
|
||||||
[ (match) ] H{ } make-assoc swap [ drop f ] unless ;
|
[ (match) ] H{ } make swap [ drop f ] unless ;
|
||||||
|
|
||||||
MACRO: match-cond ( assoc -- )
|
MACRO: match-cond ( assoc -- )
|
||||||
<reversed>
|
<reversed>
|
||||||
|
|
@ -73,7 +73,7 @@ MACRO: match-cond ( assoc -- )
|
||||||
2dup length head over match
|
2dup length head over match
|
||||||
[ swap ?1-tail ] [ [ rest ] dip (match-first) ] ?if
|
[ swap ?1-tail ] [ [ rest ] dip (match-first) ] ?if
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: match-first ( seq pattern-seq -- bindings )
|
: match-first ( seq pattern-seq -- bindings )
|
||||||
(match-first) drop ;
|
(match-first) drop ;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,14 +151,14 @@ PRIVATE>
|
||||||
M: obj-models stream>models
|
M: obj-models stream>models
|
||||||
drop
|
drop
|
||||||
[
|
[
|
||||||
V{ } clone vp set
|
V{ } clone vp ,,
|
||||||
V{ } clone vt set
|
V{ } clone vt ,,
|
||||||
V{ } clone vn set
|
V{ } clone vn ,,
|
||||||
V{ } clone models set
|
V{ } clone models ,,
|
||||||
V{ } V{ } H{ } <indexed-seq> current-model set
|
V{ } V{ } H{ } <indexed-seq> current-model ,,
|
||||||
f current-material set
|
f current-material ,,
|
||||||
f material-dictionary set
|
f material-dictionary ,,
|
||||||
] H{ } make-assoc
|
] H{ } make
|
||||||
[
|
[
|
||||||
[ line>obj ] each-stream-line push-current-model
|
[ line>obj ] each-stream-line push-current-model
|
||||||
models get
|
models get
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue