Skip to content

Commit

Permalink
Merge pull request #11 from aSemy/update_language_annotation
Browse files Browse the repository at this point in the history
make `@Language` internal
  • Loading branch information
alllex committed Jul 26, 2023
2 parents bc43021 + 17cd466 commit e17c2b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 = "",
Expand Down
2 changes: 0 additions & 2 deletions src/commonMain/kotlin/me/alllex/parsus/token/RegexToken.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit e17c2b8

Please sign in to comment.