| 142 | |
| 143 | # argmin argmax |
| 144 | class ArgNode(ASTNode): |
| 145 | def __init__(self, val, data_type, fields): |
| 146 | super().__init__('ARG', val, data_type, fields) |
| 147 | |
| 148 | def textual_form_core(self): |
| 149 | prompt = 'with most' if self.val == 'ARGMAX' else 'with least' |
| 150 | return ' '.join([self.fields[0].textual_form(), prompt, self.fields[1].textual_form()]) |
| 151 | |
| 152 | # lt le gt ge |
| 153 | class CompNode(ASTNode): |