aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/ast.boot2
-rw-r--r--src/boot/strap/ast.clisp13
2 files changed, 12 insertions, 3 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index bc444a4e..15a720bc 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -351,6 +351,8 @@ bfReduceCollect(op,y)==
a :=
op is ["QUOTE",:.] => second op
op
+ a is "append!" => bfDoCollect(body,itl,'lastNode,'skipNil)
+ a is "append" => bfDoCollect(['copyList,body],itl,'lastNode,'skipNil)
op := bfReName a
init := a has SHOETHETA or op has SHOETHETA
bfOpReduce(op,init,body,itl)
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index c4249a0d..9597b66d 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -484,9 +484,16 @@
((AND (CONSP |op|) (EQ (CAR |op|) 'QUOTE))
(CADR |op|))
(T |op|)))
- (SETQ |op| (|bfReName| |a|))
- (SETQ |init| (OR (GET |a| 'SHOETHETA) (GET |op| 'SHOETHETA)))
- (|bfOpReduce| |op| |init| |body| |itl|))
+ (COND
+ ((EQ |a| '|append!|)
+ (|bfDoCollect| |body| |itl| '|lastNode| '|skipNil|))
+ ((EQ |a| '|append|)
+ (|bfDoCollect| (LIST '|copyList| |body|) |itl| '|lastNode|
+ '|skipNil|))
+ (T (SETQ |op| (|bfReName| |a|))
+ (SETQ |init|
+ (OR (GET |a| 'SHOETHETA) (GET |op| 'SHOETHETA)))
+ (|bfOpReduce| |op| |init| |body| |itl|))))
(T (SETQ |seq|
(COND ((NULL |y|) (|bfTuple| NIL)) (T (CADR |y|))))
(|bfReduce| |op| (|bfTupleConstruct| |seq|)))))))