Skip to content

Commit

Permalink
add doc string for macroexpand and macroexpand-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Feb 28, 2024
1 parent 9c310d1 commit d4b680e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/lips.js
Original file line number Diff line number Diff line change
Expand Up @@ -8384,8 +8384,19 @@ var global_env = new Environment({
The lambda macro creates a new anonymous function. If the first element of
the body is a string and there is more elements the string is used as the
documentation string, that can be read using (help fn).`),
'macroexpand': new Macro('macroexpand', macro_expand()),
'macroexpand-1': new Macro('macroexpand-1', macro_expand(true)),
// ------------------------------------------------------------------
'macroexpand': doc(
new Macro('macroexpand', macro_expand()),
`(macroexpand expr)
Macro that expand all macros inside and return single expression as output.`),
// ------------------------------------------------------------------
'macroexpand-1': doc(
new Macro('macroexpand-1', macro_expand(true)),
`(macroexpand-1 expr)
Macro similar to macroexpand but it expand macros only one level
and return single expression as output.`),
// ------------------------------------------------------------------
'define-macro': doc(new Macro(macro, function(macro, { use_dynamic, error }) {
if (is_pair(macro.car) && macro.car.car instanceof LSymbol) {
Expand Down

0 comments on commit d4b680e

Please sign in to comment.