Apply pkl formatter to codebase (#1236)

This applies the Pkl formatter to `stdlib/` and `.circleci/`
This commit is contained in:
Daniel Chao
2025-10-09 15:16:38 -07:00
committed by GitHub
parent 42dcad25c6
commit 8c5bd3b7dd
19 changed files with 729 additions and 605 deletions

View File

@@ -50,7 +50,7 @@ class Parser {
/// - `"compat"` - YAML 1.1 _or_ 1.2 (default)
/// - `"1.1"` - YAML 1.1
/// - `"1.2"` - YAML 1.2 (Core schema)
mode: "compat"|"1.1"|"1.2" = "compat"
mode: "compat" | "1.1" | "1.2" = "compat"
/// Determines what the parser produces when parsing YAML `!!map` types.
///
@@ -64,7 +64,7 @@ class Parser {
/// Value converters to apply to parsed values.
///
/// For further information see [PcfRenderer.converters].
converters: Mapping<Class|String(!isEmpty), (unknown) -> unknown>
converters: Mapping<Class | String(!isEmpty), (unknown) -> unknown>
/// The maximum number of aliases for collection nodes.
///
@@ -77,15 +77,15 @@ class Parser {
/// Throws if an error occurs during parsing, or if [source] contains multiple YAML documents.
///
/// If [source] is a [Resource], the resource URI is included in parse error messages.
external function parse(source: Resource|String): Value
external function parse(source: Resource | String): Value
/// Parses all YAML documents contained in [source].
///
/// Throws if an error occurs during parsing.
///
/// If [source] is a [Resource], the resource URI is included in parse error messages.
external function parseAll(source: Resource|String): List<Value>
external function parseAll(source: Resource | String): List<Value>
}
/// Pkl representation of a YAML value.
typealias Value = Null|Boolean|Number|String|Listing|Dynamic|Mapping
typealias Value = Null | Boolean | Number | String | Listing | Dynamic | Mapping