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
not <char>
emits [^.]
#84
Comments
Hey @Aloso, thanks! Will hopefully be able to look into this soon. I don't imagine this has any actual use (wouldn't "not char" essentially be an empty string?) but it makes sense to return an error. How's it going with Pomsky? |
Not quite. A character set always matches exactly one code point (exception: JavaScript regexes can also match a surrogate, which is one half of a UTF-16 code point that uses 4 bytes). That means that Other regex engines besides JavaScript do not allow The problem with translating But I think it doesn't make sense to support that in Melody (or Pomsky), because nobody needs that. That's why I wrote that I'd expect an error message when I write |
Good, thank you. I wrote you an email about that, which I guess you didn't receive. It's not super important, but I'll open an issue for it 🙂 |
Thanks for the detailed explanation! A lot of useful information there. To clarify, when referring to an empty string I didn't specifically mean if using a character class: It's true that Melody uses character classes for some instances of It could theoretically translate to something like That being said it doesn't seem like something that'd make sense to allow |
Fixed, will be released soon. Thanks! |
Describe the bug
not <char>
produces the incorrect output, since the dot does not match an arbitrary character within character set.To Reproduce
Open this playground.
Expected behavior
An error message.
The text was updated successfully, but these errors were encountered: