Skip to content

Commit 9e960a8

Browse files
committed
rt: Add a return exception
1 parent 65dfba9 commit 9e960a8

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/main/java/org/piccode/rt/PiccodeReturnException.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,10 @@
55
*
66
* @author hexaredecimal
77
*/
8-
public class PiccodeUnit implements PiccodeValue {
8+
public class PiccodeReturnException extends RuntimeException {
9+
public PiccodeValue value;
910

10-
@Override
11-
public Object raw() {
12-
return Void.TYPE;
11+
public PiccodeReturnException(PiccodeValue value) {
12+
this.value = value;
1313
}
14-
15-
@Override
16-
public String toString() {
17-
return "()";
18-
}
19-
20-
@Override
21-
public String type() {
22-
return "Unit";
23-
}
24-
25-
2614
}

0 commit comments

Comments
 (0)