beautify bf.isbpl

This commit is contained in:
Daniella / Tove 2022-05-23 10:35:26 +02:00
parent 1ccae742d6
commit c03c0b7615

View file

@ -63,14 +63,14 @@ func makeCode {
func parse {
with c ;
c "+" eq if { "arr idx arr idx aget ++ 256 % aput" 2 stop }
c "-" eq if { "arr idx arr idx aget -- 256 % aput" 2 stop }
c ">" eq if { "idx ++ =idx" 2 stop }
c "<" eq if { "idx -- =idx" 2 stop }
c "[" eq if { "while { arr idx aget } {" 2 stop }
c "]" eq if { "}" 2 stop }
c "." eq if { "arr idx aget _char putchar" 2 stop }
c "," eq if { "arr idx stdin STREAM.read stream _int 256 % aput" 2 stop }
c "+" eq if { "arr idx arr idx aget ++ 256 % aput" 2 stop }
c "-" eq if { "arr idx arr idx aget -- 256 % aput" 2 stop }
c ">" eq if { "idx ++ =idx" 2 stop }
c "<" eq if { "idx -- =idx" 2 stop }
c "[" eq if { "while { arr idx aget } {" 2 stop }
c "]" eq if { "}" 2 stop }
c "." eq if { "arr idx aget _char putchar" 2 stop }
c "," eq if { "arr idx stdin STREAM.read stream _int 256 % aput" 2 stop }
""
}