Closed Xottab-DUTY closed 7 months ago
Well, now I'm unsure if this exact feature is needed, maybe there's a better solution for my use case?
Pseudo-code:
struct production
{
static constexpr auto rule = []
{
return lexy::bytes<2>.range(65534, 65535);
}
}
I want to read 2 bytes and validate that they are in the allowed range. Yes, it's possible to validate each byte, but this is unwanted :)
Currently lexy has static assertions that only allow predefined encodings. I want to create my custom
word_encoding
so I can read 2 bytes instead of just byte one by one.