c36bcf5bc9
Gave Clippy some love
2023-01-17 07:42:36 +01:00
18d9bfb74c
Interpreter - Refactored internals out of the node implemntations
2023-01-17 07:23:17 +01:00
f29902b210
Interpreter - Handle use of super
2023-01-17 07:06:56 +01:00
60f86f28bc
Interpreter - Create superclass scope when defining subclasses
2023-01-16 07:43:57 +01:00
2a8230ac80
AST - "Super expressions" (references to superclass methods)
2023-01-15 18:50:16 +01:00
9307fde4b3
Interpreter - Obtain and set a class' superclass
2023-01-15 18:18:56 +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
fb7f2f16fa
Interpreter - Fixed class declaration handling
2023-01-14 13:34: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
0ebe2e9f22
Interpreter - Class properties
2023-01-12 07:39:12 +01:00
09b4b4e688
Interpreter - Refactored getter/setter support as a trait on an instance ref
2023-01-11 19:44:52 +01:00
47c4136c25
Interpreter - Refactored instance to avoid runtime borrom problems
2023-01-11 08:21:48 +01:00
783a2e3dd0
Interpreter - Special case for initializer methods
2023-01-11 07:46:13 +01:00
3e4aea0d78
Interpreter - Working bound methods
2023-01-09 11:19:42 +01:00
e46b399399
Interpreter - Handle references to "this"
2023-01-09 08:03:41 +01:00
f9359cfe03
Interpreter - Refactored lookup_var() to use VariableExpr
2023-01-09 08:02:59 +01:00
dbd0f6d20f
Interpreter - Handle AST refactorings
2023-01-09 07:51:40 +01:00
e371217df0
Interpreter - Initialize methods when creating classes
2023-01-09 07:32:29 +01:00
5cfe6d3e5c
Interpreter - Set instance properties
2023-01-09 07:10:10 +01:00
728c7a3857
Interpreter - Renamed class submodule to classes
2023-01-08 12:02:45 +01:00
f8bcc2d703
Interpreter - Evaluate get expressions
2023-01-08 12:00:50 +01:00
d8dba3ac5f
Rewrote value storage and implemented class instantiation
...
* Probably not the last time.
* Object-like things (functions, classes, etc...) are stored as
ref-counted cells.
* Separate data structure for native functions.
* with_callable() method on value to run specific code on objects
that are callable
* Instance type added.
* Instance construction implemented
2023-01-08 10:40:36 +01:00
85e9c7db38
Interpreter - Callables now receive the callee value as an argument
2023-01-08 07:58:56 +01:00
692531ca65
Interpreter - Class declarations
2023-01-07 14:21:10 +01:00
afb465d6df
Interpreter - Use Value.to_string() for print statements
2023-01-07 14:14:24 +01:00
1af25457d5
AST - Refactored function declarations as a separate struct
2023-01-07 12:18:18 +01:00
6252bed605
Happy clippy is happy (and Clippy)
2023-01-07 11:59:32 +01:00
95ddd34f9c
Interpreter - Renamed resolved variables field
2023-01-07 09:01:24 +01:00
363cdab86f
Interpreter - Fixed closures
...
* Environment for function execution is now based on their
declaration.
* I had missed that part while skimming over the book.
2023-01-07 08:59:13 +01:00
ec70ded29e
Fixed variable lookups and assignments
2023-01-07 08:48:21 +01:00
3117dfeac5
Interpreter - Lookups and assignment based on resolver results
...
* Does not work. Using pointers was a bad idea.
2023-01-07 08:24:27 +01:00
bd156e619f
Trying to implement variable lookup and failing hard
...
* I'll probably have to rewrite environments as a Vec<HashMap> to make
things simpler
2023-01-06 08:05:33 +01:00
c97ad0ad7e
Interpreter - Made the interpreter state partially public
...
* This allows Callable to be public, which is required for Value
* State internals are still hidden behind pub(super)
2023-01-06 07:47:45 +01:00
10223cbb4e
Interpreter - WIP refactor to prepare for using resolved variables
2023-01-05 07:54:18 +01:00
d528ce8dc3
Interpreter - Limited scope of some declarations
2023-01-05 07:21:43 +01:00
743379c516
Errors refactoring for the iterpreter
2023-01-04 07:49:28 +01:00
7961a92ad1
Further attempts at refactoring the error handling code
...
* Everything's still broken though
2023-01-04 07:35:40 +01:00
db781ed00f
HAPPY CLIPPY IS HAPPY!!!!
2023-01-02 21:44:02 +01:00
f1145bfbdf
Interpreter - Lambda support
2023-01-02 21:37:56 +01:00
0de6b927b5
Interpreter - Return statement
2023-01-02 20:41:59 +01:00
e4a86eb1de
AST - Fixed statement nodes with *Stmt names
2023-01-02 20:13:51 +01:00
6acf492aa2
Interpreter - Handle function definitions
2023-01-02 20:08:47 +01:00
f02d15fa83
Interpreter - Scope change for a few functions
2023-01-02 19:49:58 +01:00
6a227c96ee
Interpreter - Fixed silly english/french confusion
2023-01-02 17:49:35 +01:00
3750b5226b
Interpreter - Check arity before calling
2023-01-02 17:47:53 +01:00
d47adab0f8
Interpreter - Call implementation
2023-01-02 17:45:56 +01:00