import * as Models from "../ivprog_elements"; import { LocalizedStrings } from "../../services/localizedStringsService"; import * as AttribuitionsManagement from "./attribution"; import * as RepeatNTimesManagement from "./repeatNtimes"; export const VAR_OR_VALUE_TYPES = Object.freeze({ only_variable: 1, only_value: 2, only_function: 3, variable_and_function: 4, variable_and_value_opt: 5, value_and_function: 6, all: 7, }); export function renderMenu ( command, ref_object, dom_object, function_obj, size_field = 2, expression_element ) { // Verificar se o objeto atual trata-se de uma chamada de função e conferir se possui a quantidade correta de parâmetros // Caso não possua, tem que adicionar as variáveis que servirão de parâmetros: if (ref_object.function_called) { if (ref_object.function_called.parameters_list) { while ( ref_object.function_called.parameters_list.length != ref_object.parameters_list.length ) { if ( ref_object.parameters_list.length > ref_object.function_called.parameters_list.length ) { ref_object.parameters_list.pop(); } else { ref_object.parameters_list.push( new Models.VariableValueMenu( VAR_OR_VALUE_TYPES.all, null, null, null, true ) ); } } } } let menu_var_or_value = '