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

Redefine severity #119

Closed phorward closed 10 months ago

phorward commented 10 months ago

Redefines Context::collect() capture severity as follows:

Severity Used by
0 _, __, Touch
5 Any token (Char, Match, Int, Float, Number), parselet default
10 Any explicitly pushed value

At least, tokens with same severity like the parselet of the context are being collected. In case the parselet severity and collect severity differs, the data model has to be changed, but IMHO there is no need for now.

This fixes #118 and influences #105 which depends on this issue.