Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
[1]. Fixes #1180 case (4).
[2]. Adds support for list/array values comparison (#2003 test (4)).
[3]. Fixes #2009, #1725. I've simply "disabled" greater/less operators for anything except "number vs. number" and "quoted string vs. quoted string" comparisons. The main show-stopper for other cases ("unquoted string vs. unquoted string vs. anything else" in particular) is that after all it comes to the toCSS-based comparison and thus brings all those "nice" side effects of the alphabetical
>
/<
ops with confusing (in the "unquoted context") results like:It's not really a big deal to put more consistency for such comparisons but the code quickly becomes too bloated (handling all those Keyword, Anonymous, escaped Quoted and their combinations) for supporting of likely never existing use-cases (assuming this rationale). In fact I was even thinking of disabling the greater/less stuff for quoted strings too (as it feels quite weird to support quoted strings more than the unquoted) but I decided to keep it for a sort of "demo" purposes (i.e. just to keep corresponding functions and code structure set up for further possible changes (if any)).