-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully rewrite Sequences to use generators
Sequences were originally written as complex classes with internal logic. This worked well enough but failed to handle the ability to extend them. To handle this need, I've switched to a single Sequence class that holds a Generator Function[0], moving all options parsing into the Sequence class. [0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function* To handle passing in strings or numbers, I've written two default generators (well, wrote one, borrowed one): numberGen and stringGen. numberGen is a simple incrementing counter, and stringGen is an implementation of Ruby's `String#succ` method. Other changes: * options parsing has been made more strict: the options must be in order. * Sequence constructor is fully typed * SequenceHandler.registerSequence is fully typed * FixtureRiveter.sequence is fully typed * Wrote a bunch of tests, idk if they're good or not, tests are hard
- Loading branch information
Noah Bogart
committed
Jan 28, 2021
1 parent
7fb980b
commit a0af35d
Showing
17 changed files
with
576 additions
and
797 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.