Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for singleBlockSectionOrNull (0.6 sec)

  1. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/execution/TopLevelBlockExtractionTest.kt

            assertNull(extractBuildscriptBlockFrom(script))
        }
    
        private
        fun extractBuildscriptBlockFrom(script: String) =
            lex(script, buildscript).document.topLevelBlocks.singleBlockSectionOrNull()?.wholeRange
    
        private
        fun extractPluginAndPluginManagementBlockFrom(script: String) =
            lex(script, pluginManagement, plugins).document.topLevelBlocks
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  2. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/execution/ProgramParser.kt

            topLevelBlocks: List<TopLevelBlock>
        ) {
            topLevelBlockIds.forEach { id ->
                topLevelBlocks
                    .filter { it.identifier === id }
                    .singleBlockSectionOrNull()
            }
        }
    
        private
        fun ProgramSourceFragment.isNotBlank() =
            source.text.subSequence(section.block.first + 1, section.block.last).isNotBlank()
    }
    
    
    internal
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  3. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/execution/Lexer.kt

                ProgramTarget.Settings -> buildscript
                ProgramTarget.Project -> buildscript
            }
        }
    }
    
    
    internal
    fun List<TopLevelBlock>.singleBlockSectionOrNull(): ScriptSection? =
        when (size) {
            0 -> null
            1 -> get(0).section
            else -> {
                val unexpectedBlock = get(1)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 9.4K bytes
    - Viewed (0)
Back to top