From 15efb07f9ec44338ab034fdfa83133b505145b06 Mon Sep 17 00:00:00 2001 From: Boolean-True Date: Thu, 2 May 2024 14:55:11 +0200 Subject: [PATCH] fix missing implementations in records --- src/main/java/de/maishai/ast/records/Constructor.java | 2 +- src/main/java/de/maishai/ast/records/Field.java | 2 +- src/main/java/de/maishai/ast/records/FieldId.java | 2 +- src/main/java/de/maishai/ast/records/Node.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/maishai/ast/records/Constructor.java b/src/main/java/de/maishai/ast/records/Constructor.java index 4280e93..d2c3245 100644 --- a/src/main/java/de/maishai/ast/records/Constructor.java +++ b/src/main/java/de/maishai/ast/records/Constructor.java @@ -2,5 +2,5 @@ package de.maishai.ast.records; import java.util.List; -public record Constructor(Id id, List params, Block block) { +public record Constructor(Id id, List params, Block block) implements Node { } diff --git a/src/main/java/de/maishai/ast/records/Field.java b/src/main/java/de/maishai/ast/records/Field.java index 562749c..546481a 100644 --- a/src/main/java/de/maishai/ast/records/Field.java +++ b/src/main/java/de/maishai/ast/records/Field.java @@ -2,5 +2,5 @@ package de.maishai.ast.records; import de.maishai.ast.Type; -public record Field(Id name, Type type) { +public record Field(Id name, Type type) implements Node { } diff --git a/src/main/java/de/maishai/ast/records/FieldId.java b/src/main/java/de/maishai/ast/records/FieldId.java index 55ced16..61cb35a 100644 --- a/src/main/java/de/maishai/ast/records/FieldId.java +++ b/src/main/java/de/maishai/ast/records/FieldId.java @@ -1,4 +1,4 @@ package de.maishai.ast.records; -public record FieldId(Boolean field, Expression recipient, Id id) { +public record FieldId(Boolean field, Expression recipient, Id id) implements Node { } diff --git a/src/main/java/de/maishai/ast/records/Node.java b/src/main/java/de/maishai/ast/records/Node.java index 9e6d51c..0560d1d 100644 --- a/src/main/java/de/maishai/ast/records/Node.java +++ b/src/main/java/de/maishai/ast/records/Node.java @@ -1,4 +1,4 @@ package de.maishai.ast.records; -public sealed interface Node permits Block, Class, Expression, LocalVariable, MainMethod, Method, Parameter, Program, Statement { +public sealed interface Node permits Block, Class, Constructor, Expression, Field, FieldId, LocalVariable, MainMethod, Method, Parameter, Program, Statement { }