Skip to content

Commit

Permalink
Small cleanup in ExpressionRenderer.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 599896908
  • Loading branch information
rluble authored and copybara-github committed Jan 19, 2024
1 parent ea6efed commit e0ee89c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.DECREMENT_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.DIVIDE_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.ELSE_KEYWORD
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.EQUAL_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.GET_KEYWORD
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.GREATER_EQUAL_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.GREATER_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.IF_KEYWORD
Expand All @@ -83,6 +84,7 @@ import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.NOT_EQUAL_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.NOT_NULL_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.NOT_SAME_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.NULL_KEYWORD
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.OBJECT_KEYWORD
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.OR_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.PLUS_OPERATOR
import com.google.j2cl.transpiler.backend.kotlin.KotlinSource.REMAINDER_OPERATOR
Expand Down Expand Up @@ -392,7 +394,7 @@ internal data class ExpressionRenderer(
nameRenderer.extensionMemberQualifiedNameSource("com.google.protobuf.kotlin.get"),
inParentheses(expressionSource(expression.arguments[0]))
),
join(source("get"), inParentheses(expressionSource(expression.arguments[1])))
join(GET_KEYWORD, inParentheses(expressionSource(expression.arguments[1])))
)
else -> error("illegal proto extension getter")
}
Expand Down Expand Up @@ -520,7 +522,7 @@ internal data class ExpressionRenderer(
qualifierSource(expression),
spaceSeparated(
Source.emptyUnless(expression.anonymousInnerClass != null) {
spaceSeparated(source("object"), COLON)
spaceSeparated(OBJECT_KEYWORD, COLON)
},
join(
newInstanceTypeDescriptorSource(typeDescriptor),
Expand Down

0 comments on commit e0ee89c

Please sign in to comment.