[plt-scheme] function `eval-compile-time-part-of-top-level'
At Thu, 9 Jan 2003 17:19:52 -0500, Guillaume Marceau wrote:
> Can you describe the difference between :
> drscheme:eval:expand-program,
This function uses expand or expand-top-level-with-compile-time-evals
as a helper function. It does far more things; as you may notice from
the docs, it takes a language as argument, which is a drscheme data
structure describing a language (including the teaching languages, plt
scheme, algol 60, a teaching version of ocaml, and java, at the moment).
> expand-top-level-with-compile-time-evals and
This is a replacement for expand as John described it in his post.
> eval-compile-time-part-of-the-top-level
I'm not sure what purpose this one serves; but it maybe be used by the
previous one.
> Also, is there a way to jump back to original code from the
> expanded version? In my case, I want to treat
> define-datatype construct (from the cs173 language) as
> special. So I want to be able to detect define-datatype is
> being used, and get the original syntax-object, unexpanded.
Try the 'origin field of the syntax objects. If that's not what you
want, might also consider defining your own define-datatype macro that
adds that information as a syntax property.
Robby