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

Add an at command, and related changes. #87

Merged
merged 1 commit into from
Sep 6, 2021
Merged

Add an at command, and related changes. #87

merged 1 commit into from
Sep 6, 2021

Conversation

okamsn
Copy link
Owner

@okamsn okamsn commented Sep 2, 2021

Fixes #70.

  • Changes:
    • add at command
    • Change sub-loop command to be a full loopy loop in loopy, or loopy-iter in loopy-iter. Accumulation in sub-loops now require the at command to returned in super-loops.
    • Add loopy-lambda
    • Add leave-from and skip-from

@okamsn
Copy link
Owner Author

okamsn commented Sep 3, 2021

UPDATE: The old feature tests are now working with the new sub-loop and at commands.

Now all that's left is adding and testing the new features.

@okamsn
Copy link
Owner Author

okamsn commented Sep 6, 2021

  • TODO:
    • Update sub-loop for loopy-iter.
    • Check whether at can be used in a do if we call macroexpand?

Calling macroexpand-all on the arguments of do seems to break using
cl-block, so we won't do that.

@okamsn okamsn force-pushed the at-cmd branch 5 times, most recently from e99f429 to 18ab4b6 Compare September 6, 2021 03:01
@okamsn
Copy link
Owner Author

okamsn commented Sep 6, 2021

User @Luis-Henriquez-Perez, if you are still using this package, then you should be aware about this upcoming change to sub-loops. This gist is that they now fully wrap a call loopy or loopy-iter, depending on the macro in which you use them, and that accumulations now require the use of the new at command.

- Add `at` command.  Add variable `loopy--at-instructions`.  Add tets.
- Add feature `loopy-lambda`.
- Add a `leave-from` command.
- Add a `skip-from` command.
- Add `loopy` and `loopy-iter` commands.
- Move variables for expansion and all user options to `loopy-vars.el`.  Require
  this library in the destructuring libraries.
- Replace `sub-loop` with a full `loopy` loop.  Convert tests to new behavior.
  - Add `loopy` as an alias of `sub-loop`.
- Make commands `skip` and `leave` use the current loop names.
- Test if loop name arguments are correct.
- Add `skip-from` and `leave-from`.
- Clean up handling processing the special macro arguments in `loopy`
  and `loopy-iter`.
- Move processing instructions to its own function.  Add ability to raise error
  on certain instructions when processing.
- Rename `loopy--tagbody-exit-used` to `loopy--non-returning-exit-used`.
- Formatting.
- Fix the `find` command.
- Don't `let`-bind `loopy--at-instructions`,
  `loopy--accumulation-list-end-vars`, and `loopy--accumulation-variable-info`.
  This variable CANNOT be let bound.  It MUST be shared by all of the loops.
- Add comment on how `loopy-iter.el` works.
- Use `map-insert!` instead of `add-to-list` to register some flags.
- Clean up `loopy-iter.el`:
  - Remove `loopy-iter--process-non-main-body`.  This has been replaced with the
    `erroring-instructions` argument of `loopy--process-instructions`.
  - Remove `loopy-iter--replace-in-sub-loop-command`.  This has been replaced
    with normal macro expansion.
- Use `macroexp-progn` instead of custom code.
- Update the CHANGELOG.
- Add version of Seq.el to package requirements.
- Update the docs.
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.

Adding an at or as command.
1 participant