tokay-lang / tokay

Tokay is a programming language designed for ad-hoc parsing, inspired by awk.
https://tokay.dev
MIT License
236 stars 7 forks source link

Turn `Capture` into object #116

Open phorward opened 11 months ago

phorward commented 11 months ago

This issue was a point in the checklist on #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

In general, this is a huge change to Tokay and the current implementation, but should be kept in mind and discussed. Right now, a change would be to big. There's also the possibility of a hybrid-implementation. An important note is, that Capture-Objects must be referenced by the VM to turn Captures into Values as soon as the Reader is committed, and any range definitions become invalid.

phorward commented 9 months ago

This would maybe an alternative solution for #123 as well.