Fixed documentation for unary ops

This commit is contained in:
Ayrton 2023-11-24 06:31:39 -07:00
parent 5ea6eca0ba
commit e2be922455

View file

@ -357,20 +357,23 @@ class AstGenerator:
self.current_ast_element = parent self.current_ast_element = parent
def generate_unary(self, op, op_type=ANY_TYPE): def generate_unary(self, op, op_type=ANY_TYPE):
"""
@brief Generate a unary operation
@param op_type: the type of the expression
"""
parent = self.current_ast_element parent = self.current_ast_element
args = [ args = [
("op", op), ("op", op),
("type", op_type), ("type", op_type),
] ]
element = build_xml_element(args, name=GAZ_UNARY_OPERATOR_TAG) self.make_element(GAZ_UNARY_OPERATOR_TAG, args)
self.current_ast_element.append(element)
self.current_ast_element = element
self.generate_xhs(GAZ_RHS_TAG, op_type) self.generate_xhs(GAZ_RHS_TAG, op_type)
self.current_ast_element = parent self.current_ast_element = parent
def generate_routine_call(self): def generate_routine_call(self): # we should generate a test case with arbitrary number of args
pass pass
def generate_conditional(self): def generate_conditional(self):