Compare commits

...

5 commits
gc ... master

Author SHA1 Message Date
2ac0fdf6ed
Update README.md 2023-03-06 15:56:34 +01:00
98f81fd35b Merge branch 'master' of github.com:TudbuT/isbpl 2023-02-06 15:21:12 +01:00
6eb84aaef3 add 0m0.00s 0m0.00s
0m0.00s 0m0.00s to stdlib
2023-02-06 15:21:04 +01:00
e1c4d442af
Update README.md 2022-10-02 22:23:32 +02:00
2f8aaade55 allow cleaning 2022-10-02 22:22:41 +02:00
3 changed files with 21 additions and 3 deletions

View file

@ -47,6 +47,13 @@ public class ISBPL {
HashMap<String, ISBPLCallable> natives = new HashMap<>();
boolean stopExceptions = false;
HashMap<Throwable, Stack<ISBPLFrame>> 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++) {

View file

@ -3,6 +3,8 @@ Improved Stack-Based Programming Language
Incomplete, not currently compilable, only interpretable.
ISBPL is now obsolete. Try [SPL](https://github.com/tudbut/spl) instead.
Stuff: [TudbuT/isbpl-random-stuff](https://github.com/TudbuT/isbpl-random-stuff)
---
@ -18,7 +20,7 @@ is the same as
```
or
```isbpl
( ( ( 2 1 * ) 1 + ) print )
(((2 1 *) 1 +) print)
```
in both languages, this will print 3.

View file

@ -593,3 +593,12 @@ func astartswith {
match alen
asub match eq
}
func times {
with callable amount ;
def i 0 =i
callable [ while { i amount lt } {
i
i 1 + =i
} ] foreach
}