Fixed up ; indent.

This commit is contained in:
Brad Nelson
2022-07-30 15:08:31 -07:00
parent 357bed3c1f
commit 5f90ef3a83
2 changed files with 39 additions and 32 deletions

View File

@ -79,11 +79,9 @@ variable indent
[char] " emit space exit then
dup >flags -TAB AND if -1 indent+! then
dup see.
dup >flags +TAB AND if
1 indent+!
else
dup >flags -TAB AND if icr then
then
dup >flags +TAB AND if 1 indent+! then
dup ['] ! = if icr then
dup ['] +! = if icr then
dup @ ['] BRANCH @ =
over @ ['] 0BRANCH @ = or
over @ ['] DONEXT @ = or
@ -95,8 +93,11 @@ variable indent
: ?see-flags >flags IMMEDIATE_MARK and if ." IMMEDIATE " then ;
: see-xt ( xt -- )
dup @ ['] see-loop @ = if
['] : see. dup see. 1 indent !
icr dup see-loop ['] ; see. ?see-flags cr
['] : see. dup see.
1 indent ! icr
dup see-loop
-1 indent+! ['] ; see.
?see-flags cr
exit
then
dup >flags BUILTIN_FORK and if ." Built-in fork: " see. exit then

View File

@ -45,14 +45,16 @@ e: test-see-number
: test 123 456 ;
see test
out: : test
out: 123 456 ;
out: 123 456
out: ;
;e
e: test-see-string
: test s" hello there" ;
see test
out: : test
out: s" hello there" ;
out: s" hello there"
out: ;
;e
e: test-see-begin-again
@ -114,8 +116,7 @@ e: test-see-for-aft-next
out: FOR
out: AFT
out: I .
out: THEN
out: .
out: THEN .
out: NEXT
out: ;
;e
@ -199,7 +200,8 @@ e: test-see-variable
: bar foo @ . ;
see bar
out: : bar
out: foo @ . ;
out: foo @ .
out: ;
;e
e: test-see-create
@ -207,7 +209,8 @@ e: test-see-create
: bar foo @ . ;
see bar
out: : bar
out: foo @ . ;
out: foo @ .
out: ;
;e
e: test-see-value
@ -215,15 +218,17 @@ e: test-see-value
: bar foo . ;
see bar
out: : bar
out: foo . ;
out: foo .
out: ;
;e
e: test-see-to
0 value foo
: bar 123 to foo ;
: bar 123 to foo . ;
see bar
out: : bar
out: 123 TO foo
out: .
out: ;
;e
@ -231,5 +236,6 @@ e: test-see-immediate
: foo 123 ; immediate
see foo
out: : foo
out: 123 ; IMMEDIATE
out: 123
out: ; IMMEDIATE
;e