mirror of
https://github.com/CPunch/Cosmo.git
synced 2026-01-22 05:00:04 +00:00
Added iterable objects
__iter and __next are now reserved IStrings, OP_NEXT and OP_ITER have also been added. A new token (TOKEN_IN) has been added to the lexer. The parser now supports the for each loop (for i, ... in <object> do ... end). savedPushed has been removed from the CCompilerState struct.
This commit is contained in:
12
src/cstate.h
12
src/cstate.h
@@ -13,11 +13,13 @@ typedef struct CCallFrame {
|
||||
} CCallFrame;
|
||||
|
||||
typedef enum IStringEnum {
|
||||
ISTRING_INIT, // __init
|
||||
ISTRING_INDEX, // __index
|
||||
ISTRING_NEWINDEX, // __newindex
|
||||
ISTRING_GETTER, // __getter
|
||||
ISTRING_SETTER, // __setter
|
||||
ISTRING_INIT, // __init
|
||||
ISTRING_INDEX, // __index
|
||||
ISTRING_NEWINDEX, // __newindex
|
||||
ISTRING_GETTER, // __getter
|
||||
ISTRING_SETTER, // __setter
|
||||
ISTRING_ITER, // __iter
|
||||
ISTRING_NEXT, // __next
|
||||
ISTRING_MAX
|
||||
} IStringEnum;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user