-
Notifications
You must be signed in to change notification settings - Fork 0
/
def.para
59 lines (51 loc) · 1.74 KB
/
def.para
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/// Patch `Object` to define `patch` method as well as default compare operator
__intern_object_patch__(Object, {
func patch(self, _patch) {
return __intern_object_patch__(self, _patch);
}
func __eql__(self, other) {
return __intern_default_compare__(self, other);
}
});
Type.patch({
func to_str(self) {
return self.name;
}
});
// These are only set so other code works fine before the actual io code gets run.
let io = Type.extend({
func write(*args) {}
func read(*args) {}
});
func print(message="", end="\n") {
io.write(message, end);
}
let pyimport = __intern_import_python__;
import "std/types/null.para";
import "std/types/num.para";
import "std/types/float.para";
import "std/types/int.para";
import "std/types/bool.para";
import "std/types/object.para";
import "std/types/func.para";
import "std/types/iterable.para";
import "std/types/array.para";
import "std/types/dict.para";
import "std/types/caseinsensitivedict.para";
import "std/types/str.para";
import "std/types/range.para";
import "std/types/macro.para";
import "std/types/enum.para";
import "std/types/exceptions/exception.para";
import "std/types/exceptions/argumenterror.para";
import "std/types/exceptions/doesnotexisterror.para";
import "std/types/exceptions/macroexpansionerror.para";
import "std/types/exceptions/multipledefinitionerror.para";
import "std/types/exceptions/typeerror.para";
import "std/types/exceptions/interruptederror.para";
import "std/types/exceptions/notimplementederror.para";
import "std/types/exceptions/lookuperror.para";
import "std/types/exceptions/arraylookuperror.para";
import "std/types/exceptions/dictlookuperror.para";
import "std/types/events/eventhandler.para";
import "std/types/events/event.para";