From f24a15cfa424c7b7fb45730e875a63fd53942fe3 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 9 Jul 2023 18:50:12 +0100 Subject: Rename "none" behaviour to "continue" --- src/main/java/org/shedlang/compiler/stackir/StackCompiler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/shedlang/compiler/stackir') diff --git a/src/main/java/org/shedlang/compiler/stackir/StackCompiler.java b/src/main/java/org/shedlang/compiler/stackir/StackCompiler.java index a8bc9d45..c4165b0a 100644 --- a/src/main/java/org/shedlang/compiler/stackir/StackCompiler.java +++ b/src/main/java/org/shedlang/compiler/stackir/StackCompiler.java @@ -106,13 +106,13 @@ public class StackCompiler { // Extract block node? var lastStatementBehaviour = lastStatement .map(statement -> statement.behaviour()) - .orElse(TypedFunctionStatementBehaviour.NONE); + .orElse(TypedFunctionStatementBehaviour.CONTINUE); switch (lastStatementBehaviour) { case TypedFunctionStatementBehaviour.BlockReturn blockReturn -> { body.add(new ReturnInstruction(node.source())); } - case TypedFunctionStatementBehaviour.None none -> { + case TypedFunctionStatementBehaviour.Continue continue_ -> { body.add(new PushUnitInstruction(node.source())); body.add(new ReturnInstruction(node.source())); } -- cgit v1.2.3