From f905c6332417ccd8266e921cfbd716db6c64c9aa Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 15 May 2010 21:06:57 +0000 Subject: * boot/ast.boot (shoeCompTran1): Handle %Leave expressions. * boot/parser.boot (bpReturn): Parse leave-expressions too. * interp/mark.boot (markInsertBodyParts): properly escape Boot keywords. --- src/boot/strap/ast.clisp | 1 + src/boot/strap/parser.clisp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/boot/strap') diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp index a754c468..a899f5ed 100644 --- a/src/boot/strap/ast.clisp +++ b/src/boot/strap/ast.clisp @@ -1596,6 +1596,7 @@ ((MEMQ (CADR |l|) |$fluidVars|) |$fluidVars|) (T (CONS (CADR |l|) |$fluidVars|)))) (RPLACA (CDR |x|) (CADR |l|))))) + ((EQ U '|%Leave|) (RPLACA |x| 'RETURN)) ((MEMQ U '(PROG LAMBDA)) (SETQ |newbindings| NIL) (LET ((|bfVar#110| (CADR |x|)) (|y| NIL)) (LOOP diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp index 55781f24..89d4bfa6 100644 --- a/src/boot/strap/parser.clisp +++ b/src/boot/strap/parser.clisp @@ -771,7 +771,7 @@ (DEFUN |bpReturn| () (OR (AND (|bpEqKey| 'RETURN) (OR (|bpAssign|) (|bpTrap|)) (|bpPush| (|bfReturnNoName| (|bpPop1|)))) - (|bpThrow|) (|bpAnd|))) + (|bpLeave|) (|bpThrow|) (|bpAnd|))) (DEFUN |bpLogical| () (|bpLeftAssoc| '(OR) #'|bpReturn|)) -- cgit v1.2.3