From 2f8aaade5598751b9472bc346f8fd9a53024ae68 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sun, 2 Oct 2022 22:22:41 +0200 Subject: [PATCH] allow cleaning --- ISBPL.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ISBPL.java b/ISBPL.java index 52939d8..e7b3d74 100644 --- a/ISBPL.java +++ b/ISBPL.java @@ -47,6 +47,13 @@ public class ISBPL { HashMap natives = new HashMap<>(); boolean stopExceptions = false; HashMap> stackTraces = new HashMap<>(); + + public static void clean() { + System.out.println("ISBPL CLEAN!!"); + defaultTypeInt = new ISBPLType("int", -2); + defaultTypeString = new ISBPLType("string", -1); + ISBPLStreamer.streams.clear(); + } private final Object syncMakeThread = new Object(); private ISBPLKeyword getKeyword(String word) { @@ -1514,8 +1521,8 @@ public class ISBPL { } // These will die as soon as std creates the real types and any types created before these are replaced become invalid. - static final ISBPLType defaultTypeInt = new ISBPLType("int", -2); - static final ISBPLType defaultTypeString = new ISBPLType("string", -1); + static ISBPLType defaultTypeInt = new ISBPLType("int", -2); + static ISBPLType defaultTypeString = new ISBPLType("string", -1); public ISBPLType getType(String name) { for (int i = 0 ; i < types.size() ; i++) {