From f0e1c8c32732ea37e508fae3ff5d5cf085042733 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 21 Mar 2026 12:45:59 +0000 Subject: Serialize Patio mutable data element declaration --- .../java/org/shedlang/compiler/patio/protobuf/PatioToProtobuf.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/org/shedlang/compiler/patio/protobuf/PatioToProtobuf.java b/src/main/java/org/shedlang/compiler/patio/protobuf/PatioToProtobuf.java index 9ed1789e..71e74967 100644 --- a/src/main/java/org/shedlang/compiler/patio/protobuf/PatioToProtobuf.java +++ b/src/main/java/org/shedlang/compiler/patio/protobuf/PatioToProtobuf.java @@ -80,7 +80,11 @@ public class PatioToProtobuf { ); case DATA_ELEMENT_MUTABLE_DECLARATION -> - throw new UnsupportedOperationException("TODO"); + new PatioDataElementMutableDeclaration( + elementProtobuf.getDataElementMutableDeclaration().getName(), + deserializeDataLayout(elementProtobuf.getDataElementMutableDeclaration().getLayout()), + deserializeSource(elementProtobuf.getDataElementMutableDeclaration().getSource(), parentSource) + ); case DATA_ELEMENT_MUTABLE_DEFINITION -> throw new UnsupportedOperationException("TODO"); @@ -109,6 +113,7 @@ public class PatioToProtobuf { var builder = PatioProtobuf.PatioDataElementMutableDeclaration.newBuilder(); builder.setSource(serializeSource(element.source(), parentSource)); builder.setName(element.name()); + builder.setLayout(serializeDataLayout(element.layout())); return builder.build(); } -- cgit v1.2.3