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

Improve destructuring sequences #117

Merged
merged 1 commit into from
May 3, 2022
Merged

Improve destructuring sequences #117

merged 1 commit into from
May 3, 2022

Conversation

okamsn
Copy link
Owner

@okamsn okamsn commented Apr 6, 2022

  • Add more tests
  • Reporting some things which should have been errors
  • Add small optimizations for a few common cases

@okamsn okamsn marked this pull request as draft April 6, 2022 02:01
@okamsn okamsn marked this pull request as ready for review May 2, 2022 00:30
@okamsn okamsn force-pushed the destr-ignore-improve branch 10 times, most recently from 1998441 to 47ea425 Compare May 3, 2022 02:37
…king.

- Document ignoring variables in the Org doc.
- Document the alternative symbol `&keys` when searching for keys in property
  lists (plists).
- Link to the section "Basic Destructuring" in the section on destructuring
  macros.
- Improve error checking for destructuring lists and arrays.  For example,
  make sure that a variable is named after `&rest` and make sure that keys are
  actually given after `&key`.
- Better skip ignored variables at the beginning and end of sequences.
- Add slight optimizations for some common cases.  For example, when only 1
  positional variable is used or when only using a `&rest` variable.
- Error when no bindings produced.
- Test that destructuring functions correctly signal an error for bad inputs.
- Test that destructuring functions produce the correct bindings.
@okamsn okamsn merged commit 9db4f2f into master May 3, 2022
@okamsn okamsn deleted the destr-ignore-improve branch September 13, 2022 12:29
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.

None yet

1 participant