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

Implement parselet capture variable $ as a dict #97

Open
phorward opened this issue Dec 27, 2022 · 1 comment
Open

Implement parselet capture variable $ as a dict #97

phorward opened this issue Dec 27, 2022 · 1 comment
Assignees
Labels
feature New feature or request

Comments

@phorward
Copy link
Member

Regarding #96, the following options would be nice as well:

  • The capture variable $ becomes a dict, where elements with the same key are chained . Such behavior is implemented in phorward/plist, for example.
  • The capture variable $ may also be used alone or with item get/set, likewise $["x"] and $[1], additionally to $x, $1.
@phorward phorward added feature New feature or request tokay labels Dec 27, 2022
@phorward phorward self-assigned this Dec 27, 2022
@phorward phorward changed the title Implement $ as a dict with duplicates Implement parselet capture variable $ as a dict Jul 28, 2023
@phorward
Copy link
Member Author

#114 and commit 440c648 makes the $0 variable not part of the stack anymore. This might be the initial start to resolve this issue.

As this issue eliminates the current capture concept, we should think about these bullet points as well:

  • Maybe the $0 variable can be held with every Frame, which fixes the collision problem
  • This issue and a comment posted in Establishing generic parselets and functions #105 (Think about a replacement of Capture by RefValue with a new value type Capture, so that Repeat returns a capture range and not a list of values) would make Captures easier to maintain, as Ranges are abstracted by RefValues. This is only an option to think about later.

@phorward phorward removed the tokay label Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant