* @brief Returns the integer assigned to local variable * * @param Token * @return int */
| 4380 | * @return int |
| 4381 | */ |
| 4382 | int |
| 4383 | GetLocalIdentifierVal(PSCRIPT_ENGINE_TOKEN Token) |
| 4384 | { |
| 4385 | PSCRIPT_ENGINE_TOKEN CurrentToken; |
| 4386 | for (uintptr_t i = 0; i < ((PSCRIPT_ENGINE_TOKEN_LIST)CurrentUserDefinedFunction->IdTable)->Pointer; i++) |
| 4387 | { |
| 4388 | CurrentToken = *(((PSCRIPT_ENGINE_TOKEN_LIST)CurrentUserDefinedFunction->IdTable)->Head + i); |
| 4389 | if (!strcmp(Token->Value, CurrentToken->Value)) |
| 4390 | { |
| 4391 | return (int)CurrentToken->VariableMemoryIdx; |
| 4392 | } |
| 4393 | } |
| 4394 | return -1; |
| 4395 | } |
| 4396 | |
| 4397 | /** |
| 4398 | * @brief Allocates a new global variable and returns the integer assigned to it |