Ver código fonte

Improved new character for attribution

Igor 5 anos atrás
pai
commit
89dc577b97
1 arquivos alterados com 27 adições e 27 exclusões
  1. 27 27
      js/visualUI/code_generator.js

+ 27 - 27
js/visualUI/code_generator.js

@@ -241,7 +241,7 @@ function repeatNtimesCode (command_obj, indentation) {
 
 	if (command_obj.var_attribution) {
 		ret += variableValueMenuCode(command_obj.var_attribution);
-		ret += ' = ';
+		ret += ' <- ';
 		ret += variableValueMenuCode(command_obj.expression1);
 	}
 	ret += ' ; ';
@@ -264,7 +264,7 @@ function repeatNtimesCode (command_obj, indentation) {
 
 	if (command_obj.var_incrementation) {
 		ret += variableValueMenuCode(command_obj.var_incrementation);
-		ret += ' = ';
+		ret += ' <- ';
 		ret += variableValueMenuCode(command_obj.expression3.itens[0]);
 
 		switch (command_obj.expression3.itens[1]) {
@@ -547,7 +547,7 @@ function attributionsCode (command_obj, indentation) {
 		ret += '\t';
 	}
 
-	ret += variableValueMenuCode(command_obj.variable) + ' = ';
+	ret += variableValueMenuCode(command_obj.variable) + ' <- ';
 
 	/*for (var i = 0; i < command_obj.expression.length; i++) {
 		ret += elementExpressionCode(command_obj.expression[i]);
@@ -812,7 +812,7 @@ function variablesCode (variable_obj) {
 
 		switch (temp.type) {
 			case Types.INTEGER:
-				ret += '= {';
+				ret += '<- {';
 				for (var j = 0; j < temp.value.length; j++) {
 					ret += temp.value[j];
 					if ((j + 1) < temp.value.length) {
@@ -822,7 +822,7 @@ function variablesCode (variable_obj) {
 				ret += '}';
 				break;
 			case Types.REAL:
-				ret += '= {';
+				ret += '<- {';
 				for (var j = 0; j < temp.value.length; j++) {
 					ret += temp.value[j].toFixed(2);
 					if ((j + 1) < temp.value.length) {
@@ -832,7 +832,7 @@ function variablesCode (variable_obj) {
 				ret += '}';
 				break;
 			case Types.TEXT:
-				ret += '= {';
+				ret += '<- {';
 				for (var j = 0; j < temp.value.length; j++) {
 					ret += '"'+temp.value[j]+'"';
 					if ((j + 1) < temp.value.length) {
@@ -842,7 +842,7 @@ function variablesCode (variable_obj) {
 				ret += '}';
 				break;
 			case Types.BOOLEAN:
-				ret += '= {';
+				ret += '<- {';
 				for (var j = 0; j < temp.value.length; j++) {
 					if (temp.value[j]) {
 						ret += LocalizedStrings.getUI("true");
@@ -862,7 +862,7 @@ function variablesCode (variable_obj) {
 
 		switch (temp.type) {
 			case Types.INTEGER:
-				ret += '= {';
+				ret += '<- {';
 
 				for (var j = 0; j < temp.rows; j++) {
 					ret += '{';
@@ -884,7 +884,7 @@ function variablesCode (variable_obj) {
 				ret += '}';
 				break;
 			case Types.REAL:
-				ret += '= {';
+				ret += '<- {';
 
 				for (var j = 0; j < temp.rows; j++) {
 					ret += '{';
@@ -906,7 +906,7 @@ function variablesCode (variable_obj) {
 				ret += '}';
 				break;
 			case Types.TEXT:
-				ret += '= {';
+				ret += '<- {';
 
 				for (var j = 0; j < temp.rows; j++) {
 					ret += '{';
@@ -927,7 +927,7 @@ function variablesCode (variable_obj) {
 				ret += '}';
 				break;
 			case Types.BOOLEAN:
-				ret += '= {';
+				ret += '<- {';
 				for (var j = 0; j < temp.rows; j++) {
 					ret += '{';
 
@@ -956,16 +956,16 @@ function variablesCode (variable_obj) {
 
 		switch (temp.type) {
 			case Types.INTEGER:
-				ret += '= ' + temp.value;
+				ret += '<- ' + temp.value;
 				break;
 			case Types.REAL:
-				ret += '= ' + temp.value.toFixed(2);
+				ret += '<- ' + temp.value.toFixed(2);
 				break;
 			case Types.TEXT:
-				ret += '= "' + temp.value + '"';
+				ret += '<- "' + temp.value + '"';
 				break;
 			case Types.BOOLEAN:
-				ret += '= ';
+				ret += '<- ';
 				if (temp.value) {
 					ret += LocalizedStrings.getUI("true");
 				} else {
@@ -1013,7 +1013,7 @@ function globalsCode () {
 
 				switch (temp.type) {
 					case Types.INTEGER:
-						ret += '= {';
+						ret += '<- {';
 						for (var j = 0; j < temp.value.length; j++) {
 							ret += temp.value[j];
 							if ((j + 1) < temp.value.length) {
@@ -1023,7 +1023,7 @@ function globalsCode () {
 						ret += '}';
 						break;
 					case Types.REAL:
-						ret += '= {';
+						ret += '<- {';
 						for (var j = 0; j < temp.value.length; j++) {
 							ret += temp.value[j].toFixed(2);
 							if ((j + 1) < temp.value.length) {
@@ -1033,7 +1033,7 @@ function globalsCode () {
 						ret += '}';
 						break;
 					case Types.TEXT:
-						ret += '= {';
+						ret += '<- {';
 						for (var j = 0; j < temp.value.length; j++) {
 							ret += '"'+temp.value[j]+'"';
 							if ((j + 1) < temp.value.length) {
@@ -1043,7 +1043,7 @@ function globalsCode () {
 						ret += '}';
 						break;
 					case Types.BOOLEAN:
-						ret += '= {';
+						ret += '<- {';
 						for (var j = 0; j < temp.value.length; j++) {
 							if (temp.value[j]) {
 								ret += LocalizedStrings.getUI("true");
@@ -1063,7 +1063,7 @@ function globalsCode () {
 
 				switch (temp.type) {
 					case Types.INTEGER:
-						ret += '= {';
+						ret += '<- {';
 
 						for (var j = 0; j < temp.rows; j++) {
 							ret += '{';
@@ -1085,7 +1085,7 @@ function globalsCode () {
 						ret += '}';
 						break;
 					case Types.REAL:
-						ret += '= {';
+						ret += '<- {';
 
 						for (var j = 0; j < temp.rows; j++) {
 							ret += '{';
@@ -1107,7 +1107,7 @@ function globalsCode () {
 						ret += '}';
 						break;
 					case Types.TEXT:
-						ret += '= {';
+						ret += '<- {';
 
 						for (var j = 0; j < temp.rows; j++) {
 							ret += '{';
@@ -1128,7 +1128,7 @@ function globalsCode () {
 						ret += '}';
 						break;
 					case Types.BOOLEAN:
-						ret += '= {';
+						ret += '<- {';
 						for (var j = 0; j < temp.rows; j++) {
 							ret += '{';
 
@@ -1157,16 +1157,16 @@ function globalsCode () {
 
 				switch (temp.type) {
 					case Types.INTEGER:
-						ret += '= ' + temp.value;
+						ret += '<- ' + temp.value;
 						break;
 					case Types.REAL:
-						ret += '= ' + temp.value.toFixed(2);
+						ret += '<- ' + temp.value.toFixed(2);
 						break;
 					case Types.TEXT:
-						ret += '= "' + temp.value + '"';
+						ret += '<- "' + temp.value + '"';
 						break;
 					case Types.BOOLEAN:
-						ret += '= ';
+						ret += '<- ';
 						if (temp.value) {
 							ret += LocalizedStrings.getUI("true");;
 						} else {