Fix locals prettyprinting
parent
120c9cacb7
commit
68ff467f6a
|
@ -116,6 +116,12 @@ write-test-2 "q" set
|
||||||
|
|
||||||
[ ] [ 5 write-test-4 drop ] unit-test
|
[ ] [ 5 write-test-4 drop ] unit-test
|
||||||
|
|
||||||
|
! Not really a write test; just enforcing consistency
|
||||||
|
:: write-test-5 ( x -- y )
|
||||||
|
[wlet | fun! [ x + ] | 5 fun! ] ;
|
||||||
|
|
||||||
|
[ 9 ] [ 4 write-test-5 ] unit-test
|
||||||
|
|
||||||
SYMBOL: a
|
SYMBOL: a
|
||||||
|
|
||||||
:: use-test ( a b c -- a b c )
|
:: use-test ( a b c -- a b c )
|
||||||
|
@ -160,3 +166,15 @@ M:: string lambda-generic ( a b -- c ) a b lambda-generic-2 ;
|
||||||
[ ] [ \ lambda-generic-2 see ] unit-test
|
[ ] [ \ lambda-generic-2 see ] unit-test
|
||||||
|
|
||||||
[ ] [ \ lambda-generic see ] unit-test
|
[ ] [ \ lambda-generic see ] unit-test
|
||||||
|
|
||||||
|
[ "[let | a! [ ] | ]" ] [
|
||||||
|
[let | a! [ ] | ] unparse
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[ "[wlet | a! [ ] | ]" ] [
|
||||||
|
[wlet | a! [ ] | ] unparse
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[ "[| a! | ]" ] [
|
||||||
|
[| a! | ] unparse
|
||||||
|
] unit-test
|
||||||
|
|
|
@ -317,7 +317,7 @@ M: lambda pprint*
|
||||||
\ | pprint-word
|
\ | pprint-word
|
||||||
t <inset
|
t <inset
|
||||||
<block
|
<block
|
||||||
values [ <block >r pprint-word r> pprint* block> ] 2each
|
values [ <block >r pprint-var r> pprint* block> ] 2each
|
||||||
block>
|
block>
|
||||||
\ | pprint-word
|
\ | pprint-word
|
||||||
<block pprint-elements block>
|
<block pprint-elements block>
|
||||||
|
@ -329,7 +329,7 @@ M: let pprint*
|
||||||
\ ] pprint-word ;
|
\ ] pprint-word ;
|
||||||
|
|
||||||
M: wlet pprint*
|
M: wlet pprint*
|
||||||
\ [let pprint-word
|
\ [wlet pprint-word
|
||||||
{ wlet-body wlet-vars wlet-bindings } get-slots pprint-let
|
{ wlet-body wlet-vars wlet-bindings } get-slots pprint-let
|
||||||
\ ] pprint-word ;
|
\ ] pprint-word ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue