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
Several of the token names come from the PHP token_get_all function. Since, in PHP, the percent sign is the modulus operator, the CSS tokenizer just keeps that name. The name of the token is just a name, not any idication of what operation the token is expected to be performing in that context of the code.
Is the way the tokens are being defined affecting a sniff, or the results of a running your code through a standard, or are you just trying to understand how the tokenizer works?
Line 328 of src/Tokenizers/CSS.php is where the minus sign token is removed and instead added to the LNUMBER after it. You could add a new case to do something similar with plus signs, or create a sniff that says plus signs are not allowed since they are assumed.
Given the following testcode:
The tokenizer short output
Note the following inconsistency:
Plus sign and number tokenized separately:
versus minus sign tokenized as part of the
T_LNUMBER
token:And the following unexpected result - the percent sign is tokenized as modulus:
The text was updated successfully, but these errors were encountered: