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

Rewrite let-args to object-centric model #1040

Closed
shirok opened this issue Jun 11, 2024 · 0 comments
Closed

Rewrite let-args to object-centric model #1040

shirok opened this issue Jun 11, 2024 · 0 comments

Comments

@shirok
Copy link
Owner

shirok commented Jun 11, 2024

As let-args becomes more featureful, the macrology gets pretty complicated. Specifically, plural option handling requires extra branch of code variation. I don't like it. We can rather delegate handling of variations to runtime <option-spec> arguments and keep macro simple.

The idea is to make <option-spec> hold the actual option argument value. As cmdline options are parsed, the values are accumulated in each instance. After parsing is done, let-args binds variables with the extracted values of each instance.

With this, the handling of plural options are done in ordinary runtime procedures.

shirok added a commit that referenced this issue Jun 15, 2024
shirok added a commit that referenced this issue Jun 15, 2024
The option arguments are now saved in <option-spec> after parsing.
Cf. #1040
shirok added a commit that referenced this issue Jun 18, 2024
This eliminates the awkward handler to set the option value.

Finishes #1040
@shirok shirok closed this as completed Jun 18, 2024
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

1 participant