org.jetbrains.kotlin.psi.utils¶
Types¶
OperatorTokens¶
object OperatorTokens
Maps between Kotlin operator tokens and the operator-convention function names they desugar to (for example, + maps to plus), and groups the operator tokens by category (unary, binary, assignment, comparison, and so on).
Functions¶
hasFloatNumericLiteralSuffix¶
fun hasFloatNumericLiteralSuffix(text: String): Boolean
Checks whether the text representation of a number literal has a float number suffix.
hasIllegallyPositionedUnderscore¶
fun hasIllegallyPositionedUnderscore(text: String, isFloatingPoint: Boolean): Boolean
Checks whether the given text contains an underscore in an illegal position. Underscores are allowed only between digits, not at the beginning or end of the number or one of its parts.
hasLongNumericLiteralSuffix¶
fun hasLongNumericLiteralSuffix(text: String): Boolean
Checks whether the text representation of a number literal has a long number suffix.
hasUnsignedLongNumericLiteralSuffix¶
fun hasUnsignedLongNumericLiteralSuffix(text: String): Boolean
Checks whether the text representation of a number literal has both a long and an unsigned number suffix.
hasUnsignedNumericLiteralSuffix¶
fun hasUnsignedNumericLiteralSuffix(text: String): Boolean
Checks whether the text representation of a number literal has an unsigned number suffix.
parseBooleanLiteral¶
fun parseBooleanLiteral(text: String): Boolean
Converts the given text, either true or false, to a boolean value.
parseNumericLiteral¶
fun parseNumericLiteral(text: String, isFloatingPointLiteral: Boolean): Number?
toConstantExpressionElementType¶
Converts the given ConstantValueKind to the corresponding com.intellij.psi.tree.IElementType.