add global scope

This commit is contained in:
cajun
2024-09-29 14:07:07 -05:00
parent 8709e69bcc
commit ebc4c4fa8d
6 changed files with 39 additions and 8 deletions
+1
View File
@@ -30,6 +30,7 @@ enum InstructionType
// Variables
, I_GET_VAR = 4 ///< arg = var : find a variable, push its value onto the stack, it is an error if the variable is not found
, I_SET_VAR = 5 ///< arg = var : assign the top value from the stack to a variable (doesn't pop)
, I_SET_GLB = 21 ///< arg = var : assign the top value from the stack to a global variable (doesn't pop)
// Objects
, I_MEMBER_C = 6 ///< arg = const name : finds a member of the top of the stack replaces the top of the stack with the member
, I_LOOP = 7 ///< arg = address : loop over the elements of an iterator, which is the *second* element of the stack (this allows for combing the results of multiple iterations)