import $ from 'jquery'; import { Types } from '../types'; import * as Models from '../ivprog_elements'; import { LocalizedStrings } from '../../services/localizedStringsService'; import * as GlobalsManagement from '../globals'; import * as VariablesManagement from '../variables'; import * as AttribuitionsManagement from './attribution'; import * as WritersManagement from './writer'; 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) { console.log('\n\ndebugging: '); console.log(command); console.log(ref_object); console.log(dom_object); console.log(function_obj); console.log(size_field); console.log(expression_element); console.log('fim\n\n'); // 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)); } } } } var menu_var_or_value = '