Original PR: https://github.com/apple/pkl/pull/1137 Author: @HT154 Created: 7/22/2025 Status: ✅ Merged Merged: 8/21/2025 Merged by: @bioball
Base: main ← Head: trailing-commas
main
trailing-commas
fb79318
10 files changed (+370 additions, -13 deletions)
📝 .idea/codeStyles/Project.xml (+1 -0) ➕ pkl-core/src/test/files/LanguageSnippetTests/input/parser/constraintsTrailingComma.pkl (+9 -0) ➕ pkl-core/src/test/files/LanguageSnippetTests/input/parser/lambdaTrailingCommas.pkl (+43 -0) ➕ pkl-core/src/test/files/LanguageSnippetTests/input/parser/methodTrailingCommas.pkl (+157 -0) ➕ pkl-core/src/test/files/LanguageSnippetTests/input/parser/trailingCommas.pkl (+3 -0) ➕ pkl-core/src/test/files/LanguageSnippetTests/output/parser/constraintsTrailingComma.pcf (+3 -0) ➕ pkl-core/src/test/files/LanguageSnippetTests/output/parser/methodTrailingCommas.pcf (+36 -0) ➕ pkl-core/src/test/files/LanguageSnippetTests/output/parser/trailingCommas.pcf (+3 -0) ➕ pkl-core/src/test/kotlin/org/pkl/core/parser/TrailingCommasTest.kt (+82 -0) 📝 pkl-parser/src/main/java/org/pkl/parser/Parser.java (+33 -13)
.idea/codeStyles/Project.xml
pkl-core/src/test/files/LanguageSnippetTests/input/parser/constraintsTrailingComma.pkl
pkl-core/src/test/files/LanguageSnippetTests/input/parser/lambdaTrailingCommas.pkl
pkl-core/src/test/files/LanguageSnippetTests/input/parser/methodTrailingCommas.pkl
pkl-core/src/test/files/LanguageSnippetTests/input/parser/trailingCommas.pkl
pkl-core/src/test/files/LanguageSnippetTests/output/parser/constraintsTrailingComma.pcf
pkl-core/src/test/files/LanguageSnippetTests/output/parser/methodTrailingCommas.pcf
pkl-core/src/test/files/LanguageSnippetTests/output/parser/trailingCommas.pcf
pkl-core/src/test/kotlin/org/pkl/core/parser/TrailingCommasTest.kt
pkl-parser/src/main/java/org/pkl/parser/Parser.java
Implements https://github.com/apple/pkl-evolution/pull/21
This changes Pkl's grammar but is not breaking. It only admits inputs that were previously invalid.
Covers these syntax elements:
parser/methodTrailingCommas.pkl
parser/trailingCommas.pkl
parser/constraintsTrailingComma.pkl
parser/lambdaTrailingCommas.pkl
Resolves #1132
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
No dependencies set.
The note is not visible to the blocked user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/1137
Author: @HT154
Created: 7/22/2025
Status: ✅ Merged
Merged: 8/21/2025
Merged by: @bioball
Base:
main← Head:trailing-commas📝 Commits (1)
fb79318Allow trailing commas in comma-separated syntax elements📊 Changes
10 files changed (+370 additions, -13 deletions)
View changed files
📝
.idea/codeStyles/Project.xml(+1 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/parser/constraintsTrailingComma.pkl(+9 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/parser/lambdaTrailingCommas.pkl(+43 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/parser/methodTrailingCommas.pkl(+157 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/parser/trailingCommas.pkl(+3 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/parser/constraintsTrailingComma.pcf(+3 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/parser/methodTrailingCommas.pcf(+36 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/parser/trailingCommas.pcf(+3 -0)➕
pkl-core/src/test/kotlin/org/pkl/core/parser/TrailingCommasTest.kt(+82 -0)📝
pkl-parser/src/main/java/org/pkl/parser/Parser.java(+33 -13)📄 Description
Implements https://github.com/apple/pkl-evolution/pull/21
This changes Pkl's grammar but is not breaking. It only admits inputs that were previously invalid.
Covers these syntax elements:
parser/methodTrailingCommas.pklparser/methodTrailingCommas.pklparser/trailingCommas.pklparser/trailingCommas.pklparser/constraintsTrailingComma.pklparser/lambdaTrailingCommas.pklparser/lambdaTrailingCommas.pklResolves #1132
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.