You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@streq values with brackets or without quotes are silently parsed as @rx #163
Some @streq values are parsed as rx instead of streq, and no error is raised. This happens when the value has ( ) [ ] in it, and also when it isn't wrapped in single quotes. The parse result then has operator.streq=None and operator.rx="streq <value>".
If the streq alternative doesn't match, the last alternative '' rx=RegExp matches the whole string, so the input is silently treated as an implicit @rx.
Suggested fix
Give streq a value rule that accepts any operator text, quoted or unquoted, including brackets and macros.
Consider whether the '' rx=RegExp fallback should apply when the input starts with a known operator name (@streq ...), since it hides parse failures like this one.
Add parametrized tests that check operator.streq is set, not just that parsing succeeds.
Activity