|
@@ -1372,6 +1372,7 @@ function getVariable (function_obj, search) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
// 3. Procurar na lista de parâmetros:
|
|
|
if (!variavel)
|
|
@@ -1381,6 +1382,8 @@ function getVariable (function_obj, search) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+=======
|
|
|
+>>>>>>> 4987846b7aa9a436f8051a02f172c75b5a6fafc0
|
|
|
}
|
|
|
|
|
|
if (search.instance == "expression"
|
|
@@ -1400,6 +1403,7 @@ function getVariable (function_obj, search) {
|
|
|
if (search.instance == "expression"
|
|
|
&& search.type == "var"
|
|
|
&& search.class == "vector") {
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
var obj = new Models.VariableValueMenu(
|
|
|
VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,
|
|
@@ -1429,10 +1433,24 @@ function getVariable (function_obj, search) {
|
|
|
var obj = new Models.VariableValueMenu(
|
|
|
VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,
|
|
|
null,
|
|
|
+=======
|
|
|
+ /*
|
|
|
+ variable_and_value = 7,
|
|
|
+ content = null,
|
|
|
+ row = null,
|
|
|
+ column = null,
|
|
|
+ include_constant = true,
|
|
|
+ dimensions = 0
|
|
|
+ */
|
|
|
+ var obj = new Models.VariableValueMenu(
|
|
|
+ VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,
|
|
|
+ variavel,
|
|
|
+>>>>>>> 4987846b7aa9a436f8051a02f172c75b5a6fafc0
|
|
|
null,
|
|
|
null,
|
|
|
true
|
|
|
);
|
|
|
+<<<<<<< HEAD
|
|
|
// Procurar a função para referência:
|
|
|
for (var i = 0; i < program_obj.functions.length; i++) {
|
|
|
if (program_obj.functions[i].name == search.value) {
|
|
@@ -1445,10 +1463,14 @@ function getVariable (function_obj, search) {
|
|
|
obj.parameters_list.push(getVariable(function_obj,search.params[i][0]));
|
|
|
}
|
|
|
return obj;
|
|
|
+=======
|
|
|
+
|
|
|
+>>>>>>> 4987846b7aa9a436f8051a02f172c75b5a6fafc0
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export function expressionParserToVisual (text, function_obj, input_field) {
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
if (text.trim().length == 0) {
|
|
|
return [new Models.VariableValueMenu(
|
|
@@ -1462,6 +1484,9 @@ export function expressionParserToVisual (text, function_obj, input_field) {
|
|
|
|
|
|
var var_not_found = [];
|
|
|
var fun_not_found = [];
|
|
|
+=======
|
|
|
+ var var_not_found = [];
|
|
|
+>>>>>>> 4987846b7aa9a436f8051a02f172c75b5a6fafc0
|
|
|
var parsed;
|
|
|
try {
|
|
|
parsed = ivprogCore.parseExpression(text);
|
|
@@ -1482,7 +1507,11 @@ export function expressionParserToVisual (text, function_obj, input_field) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
// 2. Procurar a variável nas globais:
|
|
|
+=======
|
|
|
+ // 2. Procurar a variável nas gloais:
|
|
|
+>>>>>>> 4987846b7aa9a436f8051a02f172c75b5a6fafc0
|
|
|
if (!variavel)
|
|
|
for (var j = 0; j < program_obj.globals.length; j++) {
|
|
|
if (program_obj.globals[j].name == parsed[i].value) {
|
|
@@ -1490,6 +1519,7 @@ export function expressionParserToVisual (text, function_obj, input_field) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
// 3. Procurar a variável nos parâmetros:
|
|
|
if (!variavel)
|
|
@@ -1499,10 +1529,13 @@ export function expressionParserToVisual (text, function_obj, input_field) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+=======
|
|
|
+>>>>>>> 4987846b7aa9a436f8051a02f172c75b5a6fafc0
|
|
|
|
|
|
if (!variavel)
|
|
|
var_not_found.push(parsed[i].value);
|
|
|
}
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
var funcao;
|
|
|
if (parsed[i].instance == "expression"
|
|
@@ -1525,6 +1558,8 @@ export function expressionParserToVisual (text, function_obj, input_field) {
|
|
|
let uniqueWords = [...new Set(fun_not_found)];
|
|
|
Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_undeclared_function') + " " + uniqueWords.join(", "));
|
|
|
return null;
|
|
|
+=======
|
|
|
+>>>>>>> 4987846b7aa9a436f8051a02f172c75b5a6fafc0
|
|
|
}
|
|
|
|
|
|
if (var_not_found.length > 0) {
|