Commit graph

317 commits

Author SHA1 Message Date
8e938db4f9 Interpreter - Printing using to_string 2023-01-19 18:40:06 +01:00
1377ba1a23 Resolver - Check class methods against special member definitions 2023-01-18 07:53:35 +01:00
ef7068e027 Special class members: structures and a few definitions 2023-01-18 07:30:00 +01:00
c36bcf5bc9 Gave Clippy some love 2023-01-17 07:42:36 +01:00
3861062565 Resolver - Better errors when 'super' is used where it shouldn't 2023-01-17 07:39:53 +01:00
18d9bfb74c Interpreter - Refactored internals out of the node implemntations 2023-01-17 07:23:17 +01:00
b01ae10d09 Classes - Refactored super handling 2023-01-17 07:13:09 +01:00
f29902b210 Interpreter - Handle use of super 2023-01-17 07:06:56 +01:00
4e866165ea Classes - Superclass method accessor 2023-01-17 07:06:38 +01:00
772e8ad64f Classes - Removed a few useless returns 2023-01-17 06:51:28 +01:00
60f86f28bc Interpreter - Create superclass scope when defining subclasses 2023-01-16 07:43:57 +01:00
cf909eef23 Resolver - "super" implementation 2023-01-16 07:33:08 +01:00
45ffa5cdab AST - Represent the "super" keyword as a VariableExpr 2023-01-16 07:31:54 +01:00
1a39e40325 Resolver - Superclass environments 2023-01-16 07:26:34 +01:00
d6f03f1429 Parser - Handle super.method 2023-01-15 18:58:29 +01:00
2a8230ac80 AST - "Super expressions" (references to superclass methods) 2023-01-15 18:50:16 +01:00
896b0deef7 Classes - Support using members from superclasses
* This includes methods, as per the book, but also getters and setters
2023-01-15 18:44:30 +01:00
9307fde4b3 Interpreter - Obtain and set a class' superclass 2023-01-15 18:18:56 +01:00
031efc33b1 Value - Replaced class check with class extractor 2023-01-15 18:18:32 +01:00
214cc6dc25 Classes - May now carry a reference to their superclass 2023-01-15 18:13:51 +01:00
3c062df202 Values - Method that checks that a value is a reference to a class 2023-01-15 18:08:55 +01:00
453d243b91 Resolver - Resolve superclasses 2023-01-15 17:59:37 +01:00
6b384cda5d AST - Store superclass as a var expr 2023-01-15 17:57:29 +01:00
33c28db780 Parser - Read superclass name 2023-01-15 17:51:38 +01:00
164e7952bd AST - Added superclass field 2023-01-15 17:47:52 +01:00
680c4b249d Parser - Support for getters and setters 2023-01-14 17:01:17 +01:00
3d55901c51 Classes - Fixed static setters 2023-01-14 17:00:54 +01:00
77d47ef62f Functions - Custom debug code to avoid dumping the environment 2023-01-14 16:57:09 +01:00
aa8394d619 Interpreter - Applied formatting 2023-01-14 16:08:28 +01:00
9627f588d2 Interpreter - Getter/setter execution 2023-01-14 16:07:59 +01:00
c372979009 Interpreter - Refactored method handling to prepare for getters/setters 2023-01-14 15:47:58 +01:00
1272b5ec89 Finished class member structure refactor 2023-01-14 14:03:21 +01:00
fb7f2f16fa Interpreter - Fixed class declaration handling 2023-01-14 13:34:18 +01:00
71a58c12a2 Parser - Accomodate AST class structure changes 2023-01-14 13:20:50 +01:00
366ba6e307 Resolver - Refactored class member resolution again 2023-01-14 13:17:25 +01:00
141571569d Dumper - Fixed imports 2023-01-14 11:15:52 +01:00
c3bdc23081 AST - Refactored class member data structures 2023-01-14 11:14:53 +01:00
f2637fb319 Dumper - Handle property getters/setters 2023-01-14 11:00:10 +01:00
ddb2c94ae5 AST - Added property getters/setters 2023-01-14 10:56:10 +01:00
373668fc23 AST - Comments for ClassDecl members 2023-01-14 10:50:30 +01:00
39276f4756 Resolver - Ensure method names are unique 2023-01-13 08:31:08 +01:00
77f14bfa8e Interpreter - Static methods are returned by the getter 2023-01-13 08:21:18 +01:00
75652b95cf Interpreter - Store static methods inside classes 2023-01-13 08:16:26 +01:00
ed704b1a63 Interpreter - Refactored method extraction 2023-01-12 08:54:23 +01:00
d2b66db852 Interpreter - Filter non-static methods during class creation 2023-01-12 08:47:16 +01:00
fb588e07a2 Parser - Fixed borrow error 2023-01-12 08:46:06 +01:00
4255fc30d5 Resolver - Removed unused import 2023-01-12 08:41:35 +01:00
599652e98e Resolver - Refactored to work with the new class structure 2023-01-12 08:41:04 +01:00
0dbc631c96 Parser - Disallow static initializers 2023-01-12 08:40:21 +01:00
b77d69c989 Parser - Static methods 2023-01-12 08:15:36 +01:00