Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Expanded parser for advanced input #32

Closed
wants to merge 2 commits into from
Closed

Expanded parser for advanced input #32

wants to merge 2 commits into from

Conversation

CodyJasonBennett
Copy link
Contributor

@CodyJasonBennett CodyJasonBennett commented Jan 26, 2021

This pull request expands on #31 by creating a new parseProps method that expands on parsing float values and introducing conversions with modifiers like deg(180) to specify 180 degrees or π radians.

You can play around with this in the updated tests.

I have not yet applied this to the internal applyProps method as I'm unsure of the exact implementation, as this is a recent development.

@CodyJasonBennett CodyJasonBennett changed the title Created parser in applyProps util to parse and convert numerical floats. Expanded numerical parser for degrees and chained input Jan 26, 2021
@CodyJasonBennett CodyJasonBennett changed the title Expanded numerical parser for degrees and chained input Expanded parser for advanced input Jan 26, 2021
@hmans
Copy link
Owner

hmans commented Jan 26, 2021

Thank you for the PR! Do you mind if I take this as a base and refine it further? I would like to do the following things:

  • integrate it into applyProps, obviously ;-)
  • refactor it so we can hook in additional transformations later (I'm not sure if there's ever going to be more of them, but I would prefer this to be a "transforms" feature, not a "degree to radians" one, if you catch my drift; just to be able to reason about the code better)
  • do another pass of potential performance optimizations (eg. run strings through parseFloat as little as possible)

@CodyJasonBennett
Copy link
Contributor Author

Sure thing.

@CodyJasonBennett CodyJasonBennett marked this pull request as draft January 26, 2021 14:35
@hmans hmans mentioned this pull request Jan 26, 2021
@hmans
Copy link
Owner

hmans commented Jan 26, 2021

Thanks, this will now continue in #33!

@hmans hmans closed this Jan 26, 2021
@CodyJasonBennett CodyJasonBennett deleted the support-degrees branch January 26, 2021 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants