Skip to content

Commit

Permalink
\{} is null expression
Browse files Browse the repository at this point in the history
  • Loading branch information
JimLaskey committed Mar 15, 2024
1 parent 3e2df75 commit 9bea589
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -725,14 +725,9 @@ JCExpression stringTemplate() {
literals = literals.tail;
while (token.pos < endPos && token.kind != DEFAULT && token.kind != ERROR) {
accept(LBRACE);
if (token.kind == RBRACE) {
fragment += literals.head;
} else {
expressions = expressions.append(term(EXPR));
fragments = fragments.append(fragment);
fragment = literals.head;
}
literals = literals.tail;
JCExpression expression = token.kind == RBRACE ? F.at(pos).Literal(TypeTag.BOT, null)
: term(EXPR);
expressions = expressions.append(expression);
if (token.kind != ERROR) {
accept(RBRACE);
}
Expand Down

0 comments on commit 9bea589

Please sign in to comment.