Get closures working!
In the process, I had to change the grammar. There is now a strong separation between statements and expressions. The code was just wrong before when it popped locals at the end of a block scope because there could be temporaries on the stack if the block was in expression position. This fixes that. Still need to implement closing over `this`.
This commit is contained in:
@@ -38,8 +38,8 @@
|
||||
29AB1F2E1816FA66004B501E /* wren_vm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_vm.c; path = src/wren_vm.c; sourceTree = SOURCE_ROOT; };
|
||||
29AB1F3018170104004B501E /* wren_compiler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_compiler.c; path = src/wren_compiler.c; sourceTree = SOURCE_ROOT; };
|
||||
29AB1F3118170104004B501E /* wren_compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wren_compiler.h; path = src/wren_compiler.h; sourceTree = SOURCE_ROOT; };
|
||||
29BD8159184CCEE700FA45E9 /* wren_debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = wren_debug.h; path = src/wren_debug.h; sourceTree = SOURCE_ROOT; };
|
||||
29CEDD5618495A630074C8B7 /* wren_debug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_debug.c; path = src/wren_debug.c; sourceTree = SOURCE_ROOT; };
|
||||
29CEDD5818495A6E0074C8B7 /* wren_debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = wren_debug.h; sourceTree = SOURCE_ROOT; };
|
||||
29FA7296181D90F30089013C /* wren_core.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = wren_core.h; path = src/wren_core.h; sourceTree = SOURCE_ROOT; };
|
||||
29FA7297181D91020089013C /* wren_core.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_core.c; path = src/wren_core.c; sourceTree = SOURCE_ROOT; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -93,7 +93,7 @@
|
||||
292A45D41838566F00C34813 /* wren_value.c */,
|
||||
29AB1F2D1816FA5B004B501E /* wren_vm.h */,
|
||||
29AB1F2E1816FA66004B501E /* wren_vm.c */,
|
||||
29CEDD5818495A6E0074C8B7 /* wren_debug.h */,
|
||||
29BD8159184CCEE700FA45E9 /* wren_debug.h */,
|
||||
29CEDD5618495A630074C8B7 /* wren_debug.c */,
|
||||
);
|
||||
name = src;
|
||||
|
||||
Reference in New Issue
Block a user