lousy semicolon support, replace, escape, and ai in entities

This commit is contained in:
gnembon committed 2019-10-24 23:03:19 -03:00
1 parent 51a95a241c
commit 22134187d8
5 files changed
+65 -23

No files matched your search

+7 -7
View File
@@ -193,14 +193,14 @@ public class Tokenizer implements Iterator<Tokenizer.Token>
token.append(ch);
pos++;
linepos++;
if (expression != null && previousToken != null && previousToken.type == Token.TokenType.OPERATOR && (ch == ')' || ch == ',') )
{
if (previousToken.surface.equalsIgnoreCase(";"))
throw new ExpressionException(this.expression, previousToken,
"Cannot have semicolon at the end of the expression");
if (expression != null && previousToken != null &&
previousToken.type == Token.TokenType.OPERATOR &&
(ch == ')' || ch == ',') &&
!previousToken.surface.equalsIgnoreCase(";")
)
throw new ExpressionException(this.expression, previousToken,
"Can't have operator "+previousToken.surface+" at the end of a subexpression");
}
"Can't have operator " + previousToken.surface + " at the end of a subexpression");
}
else
{