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

Feature/modular custom parser #480

Closed

Conversation

ivoilic
Copy link

@ivoilic ivoilic commented Jul 26, 2022

Summary:

This PR build on my previous PR by breaking the custom parser in modular functions.

Motivation: By splitting the custom parser into modular functions the end user can now replace only what they need to customize rather than needing to copy and paste large parts of goober's default parse function. IMO this strikes a nice balance between customizability and durability.

Changes:

  • Replaces the prefix parameter in the setup function with a parser object parameter
  • The prefix parameter becomes an optional value in the parser object
  • The parse function is split off into 3 new functions that handle, @ rules, objects, and strings separately

Breaking Changes:

  • The prefix parameter is no longer valid in the setup function. However, this could potential be mitigated by checking the type of the parameter and defaulting to the old prefixing behavior if the parameter is a function rather than an object.

@vercel
Copy link

vercel bot commented Jul 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
goober-rocks ❌ Failed (Inspect) Jul 26, 2022 at 4:47AM (UTC)

@ivoilic
Copy link
Author

ivoilic commented Sep 12, 2022

@cristianbote Any thoughts on this? I know you liked my work on the previous iteration of this concept.

@ivoilic ivoilic closed this Sep 27, 2022
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.

2 participants