Republish under CC0
Make `prepare` use new `<aeval>` object
Make `run` use new `<aeval>` object
This projects is abandoned since 2019. As such, in 2019 I re-released it under CC0. Basically, public domain.
Если говорите по-русски, рекомендую прочитать статью про Агидель.
So, imagine yourself doing that:
λ agidel file.lisp
Before actual evaluating, the file goes through a list of so-called syntax transformers. Each of them does one simple thing: one strips comments of the code, other one transforms bracket expressions to their true form, others make the code ready to be read by the Agidel transpiler.
This repository contains all the syntax transformers I, author of Agidel, made by myself. However, it's easy for you to create your own syntax transformer. More about it below.
The list of syntax transformers to be used when transpiling can also be configured. More about it below.
Make yourself familiar with Chicken Scheme
eggs Create an egg. When naming the
module, follow this convention: agidel-syntrans.<name here>
. Each such module
must export function main
which accepts one argument — source code before
transformation as a string — and returns the code after transformation. For
example:
(module
agidel-syntrans.hello
*
(import scheme format)
(define (main source-string)
(format "Hello, ~A" source-string)))
Then share this egg with everyone else.
There is a file named $AGIDEL_DIR/syntrans
. It contains list of syntax
transformers that should be used when transpiling Agidel. For example:
(discomment
disbracket
disbrace
prepare
eval)
As you can see, even Agidel evaluation is implemented as a syntax transformer. Output of the final syntax transformer is the output of the whole transpilation process.
If no such file is found, the default list is used instead.