diff options
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/ast.boot | 1 | ||||
-rw-r--r-- | src/boot/parser.boot | 8 | ||||
-rw-r--r-- | src/boot/strap/ast.clisp | 1 | ||||
-rw-r--r-- | src/boot/strap/parser.clisp | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot index 878bb755..e386f405 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -927,6 +927,7 @@ shoeCompTran1 x== MEMQ(second l,$fluidVars)=>$fluidVars [second l,:$fluidVars] x.rest.first := second l + U = "%Leave" => x.first := "RETURN" U in '(PROG LAMBDA) => newbindings:=nil for y in second x repeat diff --git a/src/boot/parser.boot b/src/boot/parser.boot index e754375d..9525c6db 100644 --- a/src/boot/parser.boot +++ b/src/boot/parser.boot @@ -734,11 +734,15 @@ bpLeave() == ++ Return: ++ RETURN Assign +++ Leave +++ Throw +++ And bpReturn()== (bpEqKey "RETURN" and (bpAssign() or bpTrap()) and bpPush bfReturnNoName bpPop1()) - or bpThrow() - or bpAnd() + or bpLeave() + or bpThrow() + or bpAnd() bpLogical()== bpLeftAssoc('(OR),function bpReturn) 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|)) |