|
|
|
|
|
by lispm
2453 days ago
|
|
The only restriction is that it is a s-expression: a possibly nested list of data. There is no particular programming language syntax it is parsed against - it's parsed as data. For example this is a valid Lisp macro form (loop for i below 10 and j downfrom 20
when (= (+ i j) 9) sum i into isum of-type integer
finally (return (+ j isum)))
It returns 10.
The LOOP macro parses it on its own - it just sees a list of data. Lisp has other than that no idea what the tokens mean and what syntax the LOOP macro accepts. CL-USER 142 > (defmacro my-macro (&rest stuff)
t)
MY-MACRO
CL-USER 143 > (my-macro we are going to Europe and have a good time)
T
Works. |
|