SLS 6.12.3 gives an operator its precedence by its first character. An operator ending in `/` is never right-associative and never an assignment, so the left-associative class is the whole answer. The partition matches OP_TOKEN in grammar.js, whose first-character sets it has to agree with. `/` is absent because is_op_char rejects it, so no caller can pass one.
| 281 | // OP_TOKEN in grammar.js, whose first-character sets it has to agree with. |
| 282 | // `/` is absent because is_op_char rejects it, so no caller can pass one. |
| 283 | static enum TokenType op_left_class(int32_t first) { |
| 284 | switch (first) { |
| 285 | case '|': return OP_LEFT_OR; |
| 286 | case '^': return OP_LEFT_XOR; |
| 287 | case '&': return OP_LEFT_AND; |
| 288 | case '=': case '!': return OP_LEFT_EQ; |
| 289 | case '<': case '>': return OP_LEFT_REL; |
| 290 | case ':': return OP_LEFT_COLON; |
| 291 | case '+': case '-': return OP_LEFT_ADD; |
| 292 | case '*': case '%': return OP_LEFT_MUL; |
| 293 | default: return OP_LEFT_OTHER; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | // Mirrors the start class of XML_NAME in grammar.js. Every non-ASCII |
| 298 | // character is accepted, since the letter test is ASCII-only and the internal |