Skip to content

Commit 57d53bd

Browse files
cirrasfourls
authored andcommitted
Simplify conditional expression in TextLiteralNodeImpl::getType
1 parent 62b0b6d commit 57d53bd

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/node/TextLiteralNodeImpl.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ public Type getType() {
5858
boolean isSingleCharacter = (getValue().length() == 1);
5959

6060
if (hasAnsiCharacterEscape()) {
61-
return isSingleCharacter
62-
? getTypeFactory().getIntrinsic(IntrinsicType.ANSICHAR)
63-
: getTypeFactory().getIntrinsic(IntrinsicType.ANSISTRING);
61+
return getTypeFactory()
62+
.getIntrinsic(isSingleCharacter ? IntrinsicType.ANSICHAR : IntrinsicType.ANSISTRING);
6463
}
6564

6665
IntrinsicType intrinsic = isSingleCharacter ? IntrinsicType.CHAR : IntrinsicType.STRING;

0 commit comments

Comments
 (0)