Parsing Error "Unrecognised input" for color operations with color names #2124#2775
Parsing Error "Unrecognised input" for color operations with color names #2124#2775SomMeri merged 4 commits intoless:masterfrom
Conversation
…tions with color names.
|
Linking original issue: #2124 |
|
Btw., would not it make sense to add more tests for ambiguous (especially with foo {
0: 0 -red;
1: 1 - red;
2: -red * 2;
@3: -red;
&-bar@{3} {x: y}
} |
|
I was confident, but |
|
It's just also similar quite not always predictable story with hex values, for example. So I'm just a bit concerned of more side-effects this could add. Technically for Thus I probably would left P.S. e.g. just like |
|
Since |
|
Never mind, identifier multiplied by number fails no matter what, so it is better to keep it that way. If it wants to be changed, it would be different issue anyway. So I will just add test you suggested without that. |
Yep. |
Parsing Error "Unrecognised input" for color operations with color names #2124
| namedColor: function () { | ||
| parserInput.save(); | ||
| var autoCommentAbsorb = parserInput.autoCommentAbsorb; | ||
| parserInput.autoCommentAbsorb = false; |
There was a problem hiding this comment.
Investigating #2802. Indeed that's mysterious. W/o autoCommentAbsorb = false;
this property: yes /* comment */; causes infinite parser loop (why?),
but otherwise property: red /* comment */; is obviously expected to fail.
No ideas how to fix this so far.
There was a problem hiding this comment.
Never mind, I found another workaround on top of that. Now just polishing a performance for the fix.
There was a problem hiding this comment.
I added parserInput.autoCommentAbsorb = false because the comments were either doubled or swallowed without it (I do not remember which one).
Named colors inside expressions are will be parsed as colors.