private void maybeAddPlainText(int begin, int end) throws AuraValidationException {
String substring = text.substring(begin, end);
Matcher unterminated = UNTERMINATED_EXPRESSION_PATTERN.matcher(substring);
if (unterminated.matches()) {
throw new InvalidExpressionException("Unterminated expression", location);
}
Matcher curlyBangInversion = CURLY_BANG_INVERSION_PATTERN.matcher(substring);
if (curlyBangInversion.matches()) {
throw new InvalidExpressionException("Found an expression starting with '!{' but it should be '{!'",
location);
}
Token token = new Token(TokenType.PLAINTEXT, begin, end);
tokens.add(token);