mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Fix brainfuck->scheme compiler.
* module/language/brainfuck/compile-scheme.scm (compile-scheme): Fix brainfuck compiler.
This commit is contained in:
parent
79657fd3ec
commit
cdc75fd001
1 changed files with 3 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;; Brainfuck for GNU Guile
|
;;; Brainfuck for GNU Guile
|
||||||
|
|
||||||
;; Copyright (C) 2009 Free Software Foundation, Inc.
|
;; Copyright (C) 2009, 2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; This library is free software; you can redistribute it and/or
|
;; This library is free software; you can redistribute it and/or
|
||||||
;; modify it under the terms of the GNU Lesser General Public
|
;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -55,11 +55,8 @@
|
||||||
(values
|
(values
|
||||||
`(let ((pointer 0)
|
`(let ((pointer 0)
|
||||||
(tape (make-vector ,tape-size 0)))
|
(tape (make-vector ,tape-size 0)))
|
||||||
,@(if (not (eq? '<brainfuck> (car exp)))
|
,@(compile-body (cdr exp))
|
||||||
(error "expected brainfuck program")
|
(write-char #\newline))
|
||||||
`(begin
|
|
||||||
,@(compile-body (cdr exp))
|
|
||||||
(write-char #\newline))))
|
|
||||||
env
|
env
|
||||||
env))
|
env))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue