Skip to content

Commit

Permalink
fix the parser.. nextCharacterIs does not 'consume' the character if its
Browse files Browse the repository at this point in the history
not in the set of characters it expected
  • Loading branch information
crowlogic committed Jan 28, 2024
1 parent 3fe0940 commit b1e2b99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/arb/expressions/Expression.java
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,10 @@ private String evaluatePossibleSquareBracketedIndex(int depth)
if (nextCharacterIs(depth, '['))
{
int indexPosition = position;
while (!nextCharacterIs(depth, ']') && position < expression.length());
while (!nextCharacterIs(depth, ']') && position < expression.length())
{
nextCharacter();
}
index = expression.substring(indexPosition, position - 1);
}
return index;
Expand Down

0 comments on commit b1e2b99

Please sign in to comment.