From 02e87cdc0cb78cf02d3de167f1f133065d6c8a48 Mon Sep 17 00:00:00 2001 From: Jon Rafkind Date: Mon, 19 Jul 2010 16:09:24 -0600 Subject: [PATCH] add with-syntax --- collects/honu/private/common.honu | 2 ++ collects/honu/private/with.honu | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 collects/honu/private/with.honu diff --git a/collects/honu/private/common.honu b/collects/honu/private/common.honu index 1198cfade6..da866e5d36 100644 --- a/collects/honu/private/common.honu +++ b/collects/honu/private/common.honu @@ -1,5 +1,7 @@ #lang honu/core +require (forSyntax "with.honu"); + provide print; macro print () diff --git a/collects/honu/private/with.honu b/collects/honu/private/with.honu new file mode 100644 index 0000000000..3f6a996592 --- /dev/null +++ b/collects/honu/private/with.honu @@ -0,0 +1,9 @@ +#lang honu/core + +provide withSyntax; + +macro withSyntax () { + _ [variable:identifier expr:expression] { b ... /* body:statement */ }; } { + #sx scheme:syntax #sx(with-syntax ([variable expr_result]) (honu-unparsed-begin b ...)) + // applySchemeSyntax(#sx(real-syntax (with-syntax ([variable expr_result]) (honu-unparsed-begin b ...)))) +}