diff --git a/src/commonMain/kotlin/Language.kt b/src/commonMain/kotlin/me/alllex/parsus/external/Language.kt similarity index 91% rename from src/commonMain/kotlin/Language.kt rename to src/commonMain/kotlin/me/alllex/parsus/external/Language.kt index bc5a867..20162af 100644 --- a/src/commonMain/kotlin/Language.kt +++ b/src/commonMain/kotlin/me/alllex/parsus/external/Language.kt @@ -4,7 +4,7 @@ package org.intellij.lang.annotations /** * IntelliJ will inject languages into Strings when it sees this annotation. - * It's copy-pasted from https://github.com/JetBrains/java-annotations because the @Language + * It's copy-pasted from https://github.com/JetBrains/java-annotations because the `@Language` * annotation is JVM only. However, IntelliJ will still recognise it as long as the FQN matches. */ @Retention(AnnotationRetention.BINARY) @@ -17,7 +17,7 @@ package org.intellij.lang.annotations AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.ANNOTATION_CLASS, ) -annotation class Language( +internal annotation class Language( val value: String, val prefix: String = "", val suffix: String = "", diff --git a/src/commonMain/kotlin/me/alllex/parsus/token/RegexToken.kt b/src/commonMain/kotlin/me/alllex/parsus/token/RegexToken.kt index 677f7a6..708bc59 100644 --- a/src/commonMain/kotlin/me/alllex/parsus/token/RegexToken.kt +++ b/src/commonMain/kotlin/me/alllex/parsus/token/RegexToken.kt @@ -29,8 +29,6 @@ private fun Regex.withIgnoreCase(ignoreCase: Boolean) = if (!ignoreCase || RegexOption.IGNORE_CASE in options) this else Regex(pattern, options + RegexOption.IGNORE_CASE) -// TODO: Add a @Language annotation to automatically highlight the pattern as a regex in the IDE -// see: https://github.com/kotest/kotest/pull/3397 /** * Creates and registers a regex token in this grammar. *