Migrate compiler, idea and others to new case conversion api
This commit is contained in:
@@ -47,7 +47,7 @@ fun Context.isObjectFunction(function: JsExpression, functionName: String): Bool
|
||||
fun Context.isKotlinFunction(function: JsExpression, name: String): Boolean {
|
||||
if (function !is JsNameRef || function.ident != name) return false
|
||||
val receiver = (function.qualifier as? JsNameRef)?.name ?: return false
|
||||
return receiver in nodes && receiver.ident.toLowerCase(Locale.US) == "kotlin"
|
||||
return receiver in nodes && receiver.ident.lowercase() == "kotlin"
|
||||
}
|
||||
|
||||
fun isSpecialFunction(expr: JsExpression, specialFunction: SpecialFunction): Boolean =
|
||||
|
||||
@@ -18,7 +18,7 @@ enum class ErrorTolerancePolicy(val allowSyntaxErrors: Boolean, val allowSemanti
|
||||
val DEFAULT = NONE
|
||||
|
||||
fun resolvePolicy(key: String): ErrorTolerancePolicy {
|
||||
return when (key.toUpperCase(Locale.US)) {
|
||||
return when (key.uppercase()) {
|
||||
"NONE" -> NONE
|
||||
"SEMANTIC" -> SEMANTIC
|
||||
"SYNTAX", "ALL" -> ALL
|
||||
|
||||
+4
-1
@@ -311,7 +311,10 @@ private class TestDataBuilder {
|
||||
.replace(KEYWORD_MARKER, keywordWithEscapeIfNeed)
|
||||
|
||||
|
||||
val fileName = "${suite.name.decapitalize()}${case.name.capitalize()}${keyword.capitalize()}.kt"
|
||||
val decapitalizedSuiteName = suite.name.replaceFirstChar(Char::lowercaseChar)
|
||||
val capitalizedCaseName = case.name.replaceFirstChar(Char::uppercaseChar)
|
||||
val capitalizedKeyword = keyword.replaceFirstChar(Char::uppercaseChar)
|
||||
val fileName = "$decapitalizedSuiteName$capitalizedCaseName$capitalizedKeyword.kt"
|
||||
|
||||
val testDataFile = File(testDataDirPath + "/" + fileName)
|
||||
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ object ArrayFIF : CompositeFIF() {
|
||||
}
|
||||
|
||||
private val PrimitiveType.lowerCaseName
|
||||
get() = typeName.asString().toLowerCase(Locale.US)
|
||||
get() = typeName.asString().lowercase()
|
||||
|
||||
fun getTag(descriptor: CallableDescriptor, config: JsConfig): String? {
|
||||
if (descriptor !is ConstructorDescriptor) return null
|
||||
|
||||
Reference in New Issue
Block a user