def visit_inequality_sequence(self, node: ParseTreeNode, children: Tuple[ast.Value, ...] ) -> OperatorSequence: res: OperatorSequence = [children[0], ast.Operator('!='), children[1]] i: int = 2 while i < len(children): res += [ast.Operator('&&'), children[0], ast.Operator('!='), children[i]] i += 1 return res
def visit_comparison_operator(self, node: ParseTreeNode, children: StrMatch) -> ast.Operator: return ast.Operator(str(node))
def visit_bitwise_operator(self, node: ParseTreeNode, children: StrMatch) -> ast.Operator: return ast.Operator(str(node))
def visit_mathematical_operator(self, node: ParseTreeNode, children: StrMatch) -> ast.Operator: return ast.Operator(str(node))
def visit_greater_than_sequence(self, node: ParseTreeNode, children: ComparisonSequence ) -> OperatorSequence: return [children[0], ast.Operator(str(children[1])), children[2], ast.Operator('&&'), children[2], ast.Operator(str(children[3])), children[4]]