Skip to content

Commit bf75a43

Browse files
committed
FOR identifier bug fix
1 parent 7808076 commit bf75a43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/SemanticOperations/VariableAssignment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ public void checkForIdentifier() {
9595

9696
if (token.getToken().equals(TokenType.PARENTESIS_APERTURA) && i + 1 < rowFound.size()) {
9797
if (rowFound.get(i + 1).getToken().equals(TokenType.ENTERO)) {
98-
value = rowFound.get(i + 1).getLexeme();
98+
value = "0 - " + rowFound.get(i + 1).getLexeme();
9999
state = State.ASIGNADO;
100100
} else {
101101
identifierFound = false;
102102
}
103103

104104
if (i + 3 < rowFound.size() && rowFound.get(i + 2).getToken().equals(TokenType.COMA)) {
105105
if (rowFound.get(i + 3).getToken().equals(TokenType.ENTERO)) {
106-
value += " - " + rowFound.get(i + 3).getLexeme();
106+
value = rowFound.get(i + 1).getLexeme() + " - " + rowFound.get(i + 3).getLexeme();
107107
} else {
108108
identifierFound = false;
109109
}
41 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)