Skip to content

Commit

Permalink
change graphed function codec to make configuring more simple
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixaurora committed Sep 14, 2023
1 parent fe850a2 commit fe3d725
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public class GraphFunctionDefinition {
private static final Codec<GraphFunctionDefinition> createCodec(String... inputs) {
return RecordCodecBuilder.create(
instance -> instance.group(
Codec.STRING.listOf().fieldOf("function_definitions").forGetter(GraphFunctionDefinition::getRawFunctions),
Codec.STRING.listOf().fieldOf("variable_definitions").forGetter(GraphFunctionDefinition::getRawVariables),
Codec.STRING.fieldOf("return_statement").forGetter(GraphFunctionDefinition::getRawReturnStatement)
Codec.STRING.listOf().fieldOf("functions").orElse(List.of()).forGetter(GraphFunctionDefinition::getRawFunctions),
Codec.STRING.listOf().fieldOf("variables").orElse(List.of()).forGetter(GraphFunctionDefinition::getRawVariables),
Codec.STRING.fieldOf("returns").forGetter(GraphFunctionDefinition::getRawReturnStatement)
)
.apply(
instance,
Expand Down

0 comments on commit fe3d725

Please sign in to comment.