-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.txt
57 lines (45 loc) · 1.47 KB
/
README.txt
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
* DESIGN CHOICES *
I've chosen to stick with many of the core ParselTongue features excluding Objects and its GetField/SetField types.
I have added the following core types:
- CByte: maps to Racket strings (this will mean the interpreter will need to ensure the string passed to CByte represent the ASCII value of single bytes)
- CByteArray: same as CByte except it is mutable
- CList: maps to Racket vectors since Python lists are mutable
- CTuple: maps to Racket lists since Python tuples are immutable
- CRange: maps to Racket lists (the desugarer will need to generate the appropriate numbers based on the arguments passed to the method)
- CDict: maps to Racket hash tables
- CSet: maps to Racket vectors since Python sets are mutable
- CFrozSet: maps to Racket lists since Python frozen sets are immutable
- CClass: this will desugar to a function and therefore it's similar to a closure
So, the values that can be returned are as follows:
- VNum
- VStr
- VByte
- VByteArray
- VTrue
- VFalse
- VNone
- VException
- VList
- VTuple
- VRange
- VDict
- VSet
- VFrozSet
- VClass
- VClosure
* CODE STRUCTURE *
The code structure hasn't altered from what was originally given to us on GitHub. The desugarer and interpreter follow the same style as what we did for ParselTongue.
* TESTS PASSED *
Types:
test_floats.py
test_comparisons.py
test_booleans.py
Scope:
lambda1.py
lambda2.py
lambda3.py
lambda4.py
nearest-enclosing-scope.py
nesting-global-no-free.py
extra-nesting.py
simple-nesting.py