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

Make it easier to modify behavior of parse / tryparse / xparse2 #184

Open
Drvi opened this issue Nov 8, 2023 · 2 comments
Open

Make it easier to modify behavior of parse / tryparse / xparse2 #184

Drvi opened this issue Nov 8, 2023 · 2 comments

Comments

@Drvi
Copy link
Collaborator

Drvi commented Nov 8, 2023

Currently, users are expected to provide a new Options object when they need to change the default behavior from Parsers.OPTIONS. However, the main constructor for Options contains default values which are good for xparse, not necessarily for xparse2 -- for example, the delim field is set to , in that constructor while we want it to be nothing for xparse2. We should provide an easy way for users to change parsing params for xparse2 which preserves the default values we see in Parsers.OPTIONS.

@nickrobinson251
Copy link
Collaborator

is xparse2 public? i could only find FixedPointDecimals.jl using it, fwiw https://github.com/JuliaMath/FixedPointDecimals.jl/blob/0e042148d473e1ef304302cbde049e71d26b9bd0/src/parse.jl#L220

@Drvi
Copy link
Collaborator Author

Drvi commented Nov 8, 2023

I'm not sure, but it is called by both Parsers.tryparse and Parsers.parse, which are public

@nickrobinson251 nickrobinson251 changed the title Make ti easier to modify behavior of parse / tryparse / xparse2 Make it easier to modify behavior of parse / tryparse / xparse2 Nov 9, 2023
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

No branches or pull requests

2 participants