File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 33
44#include "chunk.h"
55#include "value.h"
6- #include "table.h" // Agar table.h nahi hai to isse hata dein, but usually chahiye hota hai
6+ #include "table.h"
77#include "object.h"
88
99#define STACK_MAX 256
@@ -13,9 +13,9 @@ typedef struct {
1313 uint8_t * ip ;
1414 Value stack [STACK_MAX ];
1515 Value * stackTop ;
16- Obj * objects ; // <--- YE MISSING THA (Bahut Zaroori)
17- // Table strings; // Future ke liye
18- // Table globals; // Future ke liye
16+ Obj * objects ; // <--- This was missing and causing errors in object.c
17+ Table strings ; // Needed for string interning
18+ Table globals ; // Needed for global variables
1919} VM ;
2020
2121typedef enum {
@@ -29,12 +29,12 @@ extern VM vm;
2929
3030void initVM ();
3131void freeVM ();
32- InterpretResult interpret (Chunk * chunk );
32+ InterpretResult interpret (const char * source ); // Standard CLOX signature
3333void push (Value value );
3434Value pop ();
3535
36- // Native function definition (Needed for convert_native.c)
37- void defineNative (VM * vm , const char * name , NativeFn function );
36+ // Native function helper
37+ void defineNative (const char * name , NativeFn function );
3838
3939#endif
4040
You can’t perform that action at this time.
0 commit comments