Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(function x) -> #'x; (quote . x) no longer causes an error #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nbfalcon
Copy link

@nbfalcon nbfalcon commented Apr 5, 2021

  • Macros that expand to sharpquoted forms are now also prettily printed like
    their quote equivalents:
    (defmacro test (x) `#'x) (test x) ; (test) now looks like #'x instead of (function x)
  • Don't error if the macro-expansion contains invalid quote-like forms:
    (defmacro test '(quote . t)) (test) ; (test) now expands to (quote . t) instead of erroring 
    while such macros are arguably wrong, macrostep shouldn't choke on them since
    macroexpand doesn't either.

`macrostep' already prints `quote' like ', so do something similar for
`function' (sharpquote).
`length' doesn't work on macros that expand to irregular quote forms, e.g.
(quote . x), where X is not a list. Handle those correctly as well, by
abstracting the quote checking code into a function that checks for `cons'es.
@nbfalcon
Copy link
Author

nbfalcon commented Apr 5, 2021

Fixes #23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant