Skip to content

Feature/modular custom parser - #480

Closed
ivoilic wants to merge 6 commits into
cristianbote:masterfrom
ivoilic:feature/modular-custom-parser
Closed

Feature/modular custom parser#480
ivoilic wants to merge 6 commits into
cristianbote:masterfrom
ivoilic:feature/modular-custom-parser

Conversation

@ivoilic

@ivoilic ivoilic commented Jul 26, 2022

Copy link
Copy Markdown

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

vercel Bot commented Jul 26, 2022

Copy link
Copy Markdown

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

ivoilic commented Sep 12, 2022

Copy link
Copy Markdown
Author

@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