From a03fc0a6083f1727ec672196e6abe8b32ec368c9 Mon Sep 17 00:00:00 2001 From: "Brian T. Rice" Date: Tue, 8 Feb 2011 01:13:24 -0800 Subject: [PATCH] Defined ^ and ^^ as special binary macros. --- src/lib/macro.slate | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/macro.slate b/src/lib/macro.slate index 92db172..baa2c30 100644 --- a/src/lib/macro.slate +++ b/src/lib/macro.slate @@ -73,6 +73,10 @@ expr@(nodes Node traits) suspend "Expands into a suspension-creating expression for a Block." [`((nodes Block newFor: expr) `unquote suspend)]. +"These exist to define returns as special binary macros." +[| :context :value | nodes ReturnClose of: value] asMethod: #^ on: {NoRole. nodes Node traits}. +[| :context :value | nodes ReturnFar of: value] asMethod: #^^ on: {NoRole. nodes Node traits}. + expr@(nodes Node traits) cache &environment: method "An environment-altering macro that performs no transformation on the argument: It creates a new local binding with the result of evaluating the expression -- 2.11.4.GIT