Skip to content

Commit 1e4f9ba

Browse files
reid-spencerclaude
andcommitted
Upgrade to riddl 2.0.0-rc.10-57-e012ebb9
Pin bumped to match ../bin/riddlc, then `sbt extractGrammar`. The grammar gains the optional second binder on `foreach`, which destructures a mapping into key and value. Arity against the collection's type is a validation rule rather than a grammatical one, so both shapes parse and the diagnostic can name the actual type. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent a50a792 commit 1e4f9ba

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ lazy val root = Root(
2424
// Keep these two lines in step: bumping the riddl version may require
2525
// bumping this one to whatever riddl built with.
2626
With.Scala3.configure(version = Some("3.9.0-RC4")),
27-
With.Riddl.library(version = "2.0.0-rc.10-46-286ef815", nonJVMDependency = false)
27+
With.Riddl.library(version = "2.0.0-rc.10-57-e012ebb9", nonJVMDependency = false)
2828
).settings(
2929
resolvers += "GitHub Package Registry" at "https://maven.pkg.github.com/ossuminc/riddl",
3030

sites/riddl/docs/references/riddl-grammar.ebnf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,11 @@ match_subject = get_value | literal_string | value_ref ;
277277
match_case = "case" match_pattern ["when" boolean_expression] "{" {statement} "}" ;
278278
match_pattern = comparison_operator comparand | literal_string | type_ref ;
279279
(* A25: `foreach <element> in <collection> { <statements> }`; `field <path>` collection is a
280-
FieldRef, a bare identifier is a `let`-bound local *)
281-
foreach_statement = "foreach" identifier "in" (field_ref | identifier) "{" {statement} "}" ;
280+
FieldRef, a bare identifier is a `let`-bound local. The optional second identifier destructures
281+
a mapping into key and value; arity against the collection's type is a validation rule, not a
282+
grammatical one, so both forms parse here. *)
283+
foreach_statement = "foreach" identifier ["," identifier] "in" (field_ref | identifier)
284+
"{" {statement} "}" ;
282285
283286
(* Message operations. A54: the message operand is a bare ref or an inline constructor. *)
284287
message_value = constructor | message_ref ;

0 commit comments

Comments
 (0)