- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for KotlinGrammar (0.21 sec)
-
platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/execution/KotlinGrammar.kt
import org.jetbrains.kotlin.lexer.KtTokens.SAFE_ACCESS import org.jetbrains.kotlin.lexer.KtTokens.SEMICOLON internal val kotlinGrammar: KotlinGrammar by lazy(LazyThreadSafetyMode.PUBLICATION) { KotlinGrammar() } @Suppress("MemberVisibilityCanBePrivate") internal class KotlinGrammar : Combinator(true, true) { // basic building blocks val annotationMarker = token(AT) * notWhiteSpace()
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 02 08:06:49 UTC 2023 - 8.4K bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/execution/KotlinGrammarTest.kt
fun `will not parse empty annotation`() { kotlinGrammar.annotation.failToConsumeFrom("""@""") kotlinGrammar.annotation.failToConsumeFrom("""@ \n """) } @Test fun `will not parse @ followed by whitespace`() { kotlinGrammar.annotation.failToConsumeFrom("@ something") kotlinGrammar.annotation.failToConsumeFrom("@\nsomething") kotlinGrammar.annotation.failToConsumeFrom("@/*comment*/something")
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 02 08:06:49 UTC 2023 - 5.8K bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/execution/Lexer.kt
} fun KotlinLexer.parseAnnotation(): IntRange? { val startIndex = currentPosition if (let(kotlinGrammar.fileAnnotation) is ParserResult.Success<*>) { return null; // ignoring file annotation } restore(startIndex) if (let(kotlinGrammar.annotation) is ParserResult.Success<*>) { return startIndex.offset until currentPosition.offset }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 02 08:06:49 UTC 2023 - 9.4K bytes - Viewed (0)