Attempt to make an equality expression. If the next token is an equality operator, then an EqualityExpression will be returned. Otherwise, the parameter will be returned.
(self, expression, context)
| 451 | return accum |
| 452 | |
| 453 | def attempt_EqualityExpression(self, expression, context): |
| 454 | """Attempt to make an equality expression. If the next token is an |
| 455 | equality operator, then an EqualityExpression will be returned. |
| 456 | Otherwise, the parameter will be returned.""" |
| 457 | if self.inRange(0): |
| 458 | tok = self.token(0) |
| 459 | if tok in Tokens.EQ_LIST + Tokens.NEQ_LIST and self.has_priority( |
| 460 | tok, context |
| 461 | ): |
| 462 | self.token() # swallow the "=" or "!=" |
| 463 | expression = self.make_EqualityExpression( |
| 464 | expression, self.process_next_expression(tok) |
| 465 | ) |
| 466 | if tok in Tokens.NEQ_LIST: |
| 467 | expression = self.make_NegatedExpression(expression) |
| 468 | return expression |
| 469 | |
| 470 | def make_EqualityExpression(self, first, second): |
| 471 | """This method serves as a hook for other logic parsers that |
no test coverage detected