current = tokens.poll();
next = tokens.peek();
}
private Expression parseTextExpression() {
TextExpression expression = new TextExpression();
while (current.type != TokeType.EPSILON) {
if (current.type == TokeType.TEXT) {
expression.addContant(current.value);
} else if (current.type == TokeType.START_EXPRESSION) {
expression.addExpression(parseExpressionBraces());
} else {
throw ParserException.create("parseTextExpression", current);
}
nextToken();